12

I can't login on my app with Linkedin, i see modal linked dialog with "uh oh!" What to do? Why don't work linkedin Oauth?

function onLinkedInLoad() {
  IN.Event.on(IN, "auth", function() {onLinkedInLogin();});
  IN.Event.on(IN, "logout", function() {onLinkedInLogout();});
}
function onLinkedInLogin() {
  IN.API.Profile("me")
    .fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl", "emailAddress"])
    .result(function(result) {

      console.log(firstName);
    })
    .error(function(err) {
      alert(err);
    });
}
function liAuth(){
  // 
   IN.User.authorize(function(){
       callback();
   });
   //IN.UI.Authorize().place();
}
<script type="text/javascript" src="https://platform.linkedin.com/in.js">
    api_key: 54545645645646
    authorize: false
    onLoad: onLinkedInLoad
</script>

<div onclick="liAuth()" class="loginsocbutton loginsocbutton__in" id="oauth_linkedin">click</div>
iYoung
  • 3,596
  • 3
  • 32
  • 59
trigger
  • 489
  • 10
  • 26
  • Please check my answer it's working properly https://stackoverflow.com/questions/18463713/customizing-linkedin-login-button/54566492#54566492 – Tapas Palui Feb 07 '19 at 05:38

5 Answers5

16

You need to go to your applications permissions immediately and uncheck all boxes except the 4 that appear in this screenshot. I was able to get my integration working again after that.

enter image description here

They seem to not be handling revoked permissions very gracefully. You, like us, were probably not using those extra permissions anyways.

Throttlehead
  • 1,927
  • 6
  • 22
  • 36
  • 1
    Thanks! For us we only had `r_basicprofile` checked which gave us the great error message of _uh oh!_ for all of our users. Enabling the `r_emailaddress` permission fixed the issue. – owdco May 13 '15 at 17:51
  • 1
    Thanks, you saved my day. This is the least helpful error message that I have seen. – Anshuman Jasrotia Jun 24 '15 at 00:52
  • 1
    Yeah I don't know what they're thinking over there at LinkedIn. They've quickly become my least favorite social network out there. They must be under new leadership. – Throttlehead Jul 02 '15 at 20:04
  • I get the same error no matter what options I choose I get the message in a popup window "uh oh!" – Cesar Vega Jun 09 '17 at 16:11
  • @Throttlehead I am getting the same error after following your instructions. – Arpit Kumar Sep 11 '17 at 06:50
2

A change in LinkedIns API was rolled out today wrecking code everywhere.

you can read about it here:

https://developer.linkedin.com/blog https://developer.linkedin.com/partner-programs

John M
  • 327
  • 3
  • 14
0

Besides to Jacob's answer, you need to go to your app settings and make sure that all fields are filled in - particularly logos, contact details...basically all those details that were optional before now became required. This and re-setting the permissions should work

Michal Holub
  • 730
  • 1
  • 7
  • 21
0

I had the same problem too. Message "Uh Oh!" inside the popup window, when executing IN.User.authorize(). To solve this, I recreated from scratch a new LinkedIn application, but for the same website/URL. Then I inserted the new api_key. And then it was working.

Dennis
  • 1
  • 1
0

function onLinkedInLoad() {
  IN.Event.on(IN, "auth", function() {onLinkedInLogin();});
  IN.Event.on(IN, "logout", function() {onLinkedInLogout();});
}
function onLinkedInLogin() {
  IN.API.Profile("me")
    .fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl", "emailAddress"])
    .result(function(result) {

      console.log(firstName);
    })
    .error(function(err) {
      alert(err);
    });
}
function liAuth(){
  // 
   IN.User.authorize(function(){
       callback();
   });
   //IN.UI.Authorize().place();
}
<script type="text/javascript" src="https://platform.linkedin.com/in.js">
    api_key: 54545645645646
    authorize: false
    onLoad: onLinkedInLoad
</script>

<div onclick="liAuth()" class="loginsocbutton loginsocbutton__in" id="oauth_linkedin">click</div>