I'm receiving a fatal error with OAuthSignatureMethod_HMAC_SHA1 with the module. This might be an oauth module problem so I did post over at that project.

Fatal error: Class 'OAuthSignatureMethod_HMAC_SHA1' not found in ...sites/all/modules/linkedin/linkedin.inc on line 106

Using
Linkedin 6.x-1.x-dev
Oauth 6.x-2.02

Thanks for your help.

Comments

b83s’s picture

You have to place these lines:

$signature = new OAuthSignatureMethod_HMAC_SHA1();

Below the following line:
$consumer = new OAuthConsumer($consumer_key, $consumer_secret, NULL);

This will solve the error!

flahertypj’s picture

Status: Active » Fixed

Latest update takes care of the problem. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sicapitan’s picture

Status: Closed (fixed) » Active

Still occurs on the latest beta3 - but on line linkedin.inc on line 213

/*
 * Returns an array contening the fields requested.
 * @params
 * $url : full request url to a linkedin API ressource (see API doc for syntax)
 * $tokens : the user tokens, as an array containing keys 'token_key' and 'token_secret' with their value  
 */
function linkedin_get_fields($url, $tokens) {
  $signature = new OAuthSignatureMethod_HMAC_SHA1();
  $consumer_key = variable_get('linkedin_consumer_key', '');
  $consumer_secret = variable_get('linkedin_consumer_secret', '');
  $consumer = new OAuthConsumer($consumer_key, $consumer_secret, NULL);
...
egomac’s picture

subscribing'

Hitby’s picture

subscribing

alfthecat’s picture

susbscribing

arcall’s picture

subscribe

arcall’s picture

I looked at the code and it seems the Oauth.php or any other Oauth module not referenced in the linkedin.inc. I added the initialization function 'linkedin_init();' at the beginning of the linkedin.inc and fixed the problem.

However, there is nothing under Linkedin menu in the user profile.

alfthecat’s picture

hey arcall, that's interesting. But do I understand you correctly if I think that adding the line causes the linked-in information to dissapear from profile pages?

I just noticed that the fatal error caused by this bug also breaks a calendar view on one of my sites. After a database update I get fatals as well when browsing to /admin.

This is becoming all a bit too uncomfortable to keep using this module.

davad’s picture

Status: Active » Closed (works as designed)

The module makes use of either the oauth module or the oauth library (found http://code.google.com/p/oauth/). If using the standalone oauth library, make sure you set the oauth path variable on the linkedin configuration page.

andrewkunze’s picture

I tried the linkedin_init(), yes it works but I jave a nasty warning from the facebook module. and its also a hack so not an ideal fix so I've disabled user profile.

regarding #11, where is this oAuth path Variable you speak of?!

GroupSetUp - Group Social Networking

karlitos’s picture

tried the linkedin_init() and worked removing the error of:
"Fatal error: Class 'OAuthSignatureMethod_HMAC_SHA1' not found in ...sites/all/modules/linkedin/linkedin.inc on line 212"

But once I've linked accounts I can't login with my linkedin details.

davad’s picture

#12 If you don't have the oauth module installed, you can enter the path to the oauth library at /admin/settings/linkedin. You should get the error message 'Unable to find the OAuth library. Please check your settings for the Linkedin module' every time linkedin_init() is called if it can't find the oauth library.

tivie’s picture

I get the same error.
I have OAuth module installed and so, I can't access path variable in linked admin form.

Seems that OAuth.php is not "loaded" anywhere. I fixed this issue by:

1. manually including this line in linkedin.inc, at the beginning of linkedin_get_fields function (around line 212)

require_once(variable_get('linkedin_liboauth_path', ''));

2. Removing this line at linkedin.pages.inc around line 19.

  if (!@include_once(variable_get('linkedin_liboauth_path', ''))) { // Cope with manual copy of the library

Note: and the respective closing bracket } at line 26.

This way you can manually override variable_get('linkedin_liboauth_path', '')) to its proper location. Usefull if you need to use an old version of OAuth module for other contrib modules.
Keep in mind that if you give an incorrect path, linkedin module will fallback to its default behavior (that is, filling the field automatically by figuring out where OAuth library is located).

karlitos’s picture

Thx Tivie

venusrising’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta1
Status: Closed (works as designed) » Active

This issue is still not fixed. Can someone elaborate on what to do with?

bellesmanieres’s picture

Status: Active » Needs review

To all suffering from this, can you try getting last oauth module and switching to lindedin dev release, should be fixed.

jvieille’s picture

Same problem.
Using last dev of both Oauth and Linkedin
The user just gets a blank page instead of his profile, but this might be another issue
http://drupal.org/node/1491196

NathanM’s picture

I am also getting this error, but strangely enough, only on SimpleNews newsletter content nodes, when I try to save, edit, or view a node which has been created. I can access the node add form, but saving it throws up this error:

Fatal error: Class 'OAuthSignatureMethod_HMAC_SHA1' not found in /home/natem/public_html/sites/all/modules/linkedin/linkedin.inc on line 212

Anyone else have this?

NathanM’s picture

Nevermind. Had an issue with my Oauth configuration.

Offlein’s picture

What was your error? Because I recently switched servers and am having it too.

davad’s picture

Status: Needs review » Fixed

I think this is resolved. If someone has another problem, please open a new issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.