After following and tweaking all I could find on this topic, the login keeps returning Linkedin debug : 401 : No LinkedIn account is associated with this user.

CommentFileSizeAuthor
#19 patch-linkedin-1065038-19.patch4.51 KBShaneOnABike
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

digodrupal’s picture

Same issue

combait’s picture

Priority: Normal » Critical

I got same issue: Linkedin debug : 401 : No LinkedIn account is associated with this user
This happens when i try to authenticate Linkedin at the user page and it also returns the following error:

* warning: Illegal offset type in isset or empty in /drupal-6.20/includes/bootstrap.inc on line 994.
* warning: Illegal offset type in /drupal-6.20/includes/bootstrap.inc on line 995.
* warning: Illegal offset type in /drupal-6.20/includes/bootstrap.inc on line 999.

Anyone have any ideas ?

Anoop Tech’s picture

I am also facing this issue .. Please help Me...

davad’s picture

Status: Active » Postponed (maintainer needs more info)

When you're logged in as a user that doesn't have a LinkedIn account associated and if you have the linkedin module's debug turned on, you'll get this message regularly (in fact, if debug is turned on, you'll get this message when using drush).

If that's not the case, could you give some more details about your problem?

davad’s picture

Priority: Critical » Normal
surcouf’s picture

Hi, same problem when debug mode is on.
In /user/edit the tab is empty, nothing appear.
What can I do ?
Many Thx

martijnboekema’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Active

Same Issue. I've been at it for DAYYSS now..

The problem is that the user page or specifically the following url: http://mydomain.com/?q=user/%/edit/linkedin, just returns a save and delete button. There is NO further content.

I have tried re-installing, checked the modules, permissions, auth codes, basically everything.
But I CANNOT get this to work!!
Help is highly appreciated!

devtherock’s picture

I was getting same error but form D7 version, my solution was using 2 function, I got data from linkedin which we expect in $user->linkedin

$fields = _linkedin_profile_vget_user_page_linkedin_fields();
$profile = linkedin_get_profile_fields($account->uid, $fields);
print_r($profile); // you will get data, which should have been in $user->linkedin/

Hope this help you guyz.

Thanks.

surcouf’s picture

thanks Devtherock. Unfortunately, it doesn't solve my problem.
I checked everything I could: modules settings, permissions (all are enabled for authenticated users and anonymous, all linkedin profile fields are enabled and I use "user page" as a profile display type.
My drupal admin login/email matches the one I use on linkedin.com

Login to drupal with linkedin authentication submod works only after a very weird behavior/procedure...

1. when I first click on the linkedin login button, it rings linkedin.com and ask to grant access. Then, it returns on drupal with Access to this page is denied. On the linkedin.com authorized applications page, nothing has been added.

2. Now, on the drupal login page, linkedin button doesn't show anymore. So, I try to log in via my drupal account and it automatically rings linkedin.com to grant access. Then it returns to drupal with this message Linkedin debug : LinkedIn.com answered "401 : [unauthorized]. The token used in the OAuth request is not valid:XXXtokennumberXXX. But, I'm loged in drupal now... and, on the linkedin.com authorized applications page, my drupal application has been added properly.

3. After loging out, the drupal login page shows the linkedin login button. When I click, it works, i loged in my drupal site.... but still same error from the begining Error 401: No LinkedIn account is associated with this user and on the user/account/edit/linkedin page, no content !

How could it be that I have no access to the call-back page in step 1 if permissions are all enabled ?

Anybody on this one with his/her ChrIsTmAs WaNd ?

TheThumbPuppy’s picture

same issue here

surcouf’s picture

hello, please help ... I'm desperate. Many thanks

bellesmanieres’s picture

3. After loging out, the drupal login page shows the linkedin login button. When I click, it works, i loged in my drupal site.... but still same error from the begining Error 401: No LinkedIn account is associated with this user and on the user/account/edit/linkedin page, no content !

Seems to indicate it's indeed working ok (despites the " Error 401: No LinkedIn account is associated with this user", which is due to the debug mode displaying this wrongly.) Just turn out debug mode, it's only there to troubleshoot api/keys/setup issues.

ShaneOnABike’s picture

Well in my case I am getting the same debug message, but unfortunately not able to ever associate a LinkedIn account (beta1) to my user account. Each time I click on the "Go LinkedIn" I get ..

warning: Illegal offset type in isset or empty in /home/dev2/www/dev2.tastemap.net/drupal/includes/bootstrap.inc on line 997.
warning: Illegal offset type in /home/dev2/www/dev2.tastemap.net/drupal/includes/bootstrap.inc on line 998.
warning: Illegal offset type in /home/dev2/www/dev2.tastemap.net/drupal/includes/bootstrap.inc on line 1002.

Which is a bit frustrating since it's not clear why this is happening? Should I be using the latest dev... and if so shouldn't we deploy another release rather than getting people to use dev? I'll try dev none-the-less if it's recommended.

ShaneOnABike’s picture

Priority: Normal » Major

As an update I'm using the latest dev and still getting the same issue when I click the button (whether or not I'm logged into LinkedIn)

amrit_b’s picture

I was getting this issue. Guys check CURL is enabled or not in PHP. It should be enabled. Also, It dosen't create a drupal user automatically it seems.

I will write a patch which will create a drupal user account if anoynomous user clicks on it...

Just now came accross http://drupal.org/node/1075778 - following up there.

ShaneOnABike’s picture

I downloaded the latest dev and it's working for the most part not since we are synching our clock. We are having the same issue with creating a new user though. It doesn't seem to connect the two accounts (if your email matches) which would be super duper!

**Update** We do have cURL installed on our server and working through Drupal.

aneeeshp’s picture

I am also facing the same issue. Nothing other than Delete and Save button in user/%user/edit/linkedin page. 'Linkedin debug : 401 : No LinkedIn account is associated with this user' displayed when debug is enabled. CURL is installed and enabled.

ShaneOnABike’s picture

I actually don't think the way that the user form is being generated is correct. It's not clear to me why but in my case I don't think it's actually calling all the proper hooks? Therefore, the form is super messed up. When I comment out ...

//  drupal_prepare_form('user_register', $form, $form_state);

From linkedin_auth.pages.inc the forms is back to normal so something in the prepare or creating the initial form is wrong?

Maybe this should just be a hook using form alter rather than rolling your own?

ShaneOnABike’s picture

Sorry fo the delay here is the patch that I created. I basically rewrote it to use the original user registration form. It seems a bit better but perhaps could use a bit more work. I like what the Drupal for Facebook group have done for this and perhaps we could steal some code from there (unfortunately I don't have time to sorry)

Let me know if you see any problems with this and I can fix it. I think in general it's better since it doesn't ignore all the custom calls for the user registration form.

faunapolis’s picture

Did this patch make it into the D7-dev version? Thanks

greg.harvey’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Priority: Major » Normal
Status: Active » Needs review

Is this still relevant to the D7 dev branch?

davad’s picture

I'm not sure. I haven't been able to reproduce it in the D7 branch, but I think I've seen something similar reported in another issue.