I am running the dev version for Drupal 7.x. I have a valid API key and secret code for LinkedIn. I've added this to the LinkedIn configuration in my site. Now whenever I go to my user account I'm getting:
Linkedin debug : 401 : No LinkedIn account is associated with this user
I click on the LinkedIn tab in my account and proceed to Go to LinkedIn to make the connection. This does not work. It redirects me immediately to my home page and shows the same error as above.
I've got Curl running (cURL support enabled
cURL Information 7.15.5)
I am using latest 3.x version of the OAuth module.
PHP version 5.3.3.
Any suggestions?
Best-
Trevor
Comments
Comment #1
Brainhack commentedI have the same problem - could it be that there is something with user 1 that blocks the API-calls?
Would imagine that best practice would be to never integrate user 1, then a call to die (or the eqvivalent for Drupal) could be inserted here:
* Custom access callback for linkedin/token/%user
*/
function linkedin_token_access($account) {
global $user;
if ($account->uid > 0 && $account->uid == $user->uid) {
return TRUE;
}
if (variable_get('linkedin_debug_mode', 0) == 1) {
drupal_set_message(t('LinkedIn debug : Access denied to /linkedin/token/@requested. Requesting user has uid @requesting, which is different from the requested account.',
array('@requested' => $account->uid, '@requesting' => $user->uid)), 'warning');
}
return FALSE;
}
Comment #2
ambientdrup commentedThis is happening with all the user accounts I'm testing with (besides user 1).
-Trevor
Comment #3
khandra commentedI have the same issue as before, I do not use user 1 but I am using administrator overlay.
I checked the code and I realized that if i write in url bar
linkedin/token/-uid-
linkedin website is reached and the profile is associated. So it seems to be a redirection issue, isn't it?
More details regarding this: if I do not work in administrator overlay i.e. from
/user/4/edit/linkedin
and NOT from
/user#overlay=user/4/edit/linkedin
then it works.
Comment #4
ambientdrup commentedInteresting. I'll test this out to see if I can reproduce.
-Trevor
Comment #5
davad commentedThis and #1848644: Associating a Drupal account with a LinkedIn account not working are duplicates of each other. I was able to reproduce this on a clean install.
It seems like the overlay's security is preventing the LinkedIn OAuth page from loading. Disabling the overlay module is a work around that will work.
Comment #6
ambientdrup commentedI've tried this with the overlay module disabled and no change. When I click on the "Go Linkedin" button it just redirects me back to the site's home page.
-Trevor
Comment #7
khandra commentedAre there any plans of finding a solution for this? Unfortunately I have no clue on how to fix it, neither if it is possible to fix it.
Thanks
Comment #8
ambientdrup commentedYes, I'd really like to hear back as well about proposed solutions/plans for fixing. This definitely appears to be a bug with the module.
-Trevor
Comment #9
neerajskydiver commented"Linkedin debug : 401 : No LinkedIn account is associated with this user"
Its a debug message shown when "Turn on debug mode" is enabled at admin/config/services/linkedin.
Disable "Turn on debug mode" option at admin/config/services/linkedin.
Comment #10
smalltalkman commentedI want this module to create a new Drupal user.
I applied patch https://www.drupal.org/node/1542130 to no avail.
ne1 have a version of the module which will create a new user?
no patches please