Hi there,

Just wondering how stable this version is for a production site.?

Thank you.

Comments

karlitos’s picture

I guess it's not very stable. First try and already getting:

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

I haven't been able to find an answer.....

Shame I can't make it work, it would have been nice for my site...:-(

karlitos’s picture

Title: How stable is this version for a production site? » How stable is this version for a production site? (Fatal error: Class 'OAuthSignatureMethod_HMAC_SHA1' not found)
alfthecat’s picture

subscribing

davad’s picture

Status: Active » Closed (works as designed)

It sounds like you don't have the oauth library set up. You can either use the drupal oauth module or the oauth php library available from http://code.google.com/p/oauth/ and specify the path to the library in the linkedin configuration page.

karlitos’s picture

Hi there,

I'm already using oath module for Twitter and Facebook modules. I've been trying to reinstall the linkedin module but I still get the same issue.

This module needs way more work. Maybe in the future...

davad’s picture

@karlitos What version of the oauth module are you using? I'm using oauth 6.x-3.0-beta4 with the linkedin module on a site and haven't seen that error.

karlitos’s picture

Hi Davad,

I'm actually using 6.x-2.02 version, and I have to stick to this version since twitter module does not work with the 6.x-3.x version.

Thx

tivie’s picture

Actually even if you properly set the path (or install OAuth module) this error appears. This is due to the fact that OAuth.php (or other similar file) is not "loaded" anywhere by linkedin module.

Even if you include the library in linkedin_init(), you can get this error. For instance, when a user tries to log in for the first time after he configured his linkedin account in your drupal site.

This happens because:

1. hook_init() is called after modules are already loaded in memory.
2. hook_init() is not called in cached pages.

so, hook_init() is bypassed unless you clear drupal's cache. if you change the configuration or the path to OAuth library, this error appears again. This is particularly bad if you have your admin account linked to a linkedin page.

In order to fix this issue you need to:

1. Include the library in linkedin.inc, at the beginning of linkedin_get_fields function (around line 212)

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

2. This is only required if you have an old version of OAuth module that uses a deprecated library. In this case, you have to download a more recent version from google code (instructions in linkedin README.txt file), place it somewhere in your site, set access permissions accordingly and then remove 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.
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).

I have not ran into any other issues, although I would not recommend using it in a production site, unless you feel confident enough in your PHP skills to fix errors as they appear.

karlitos’s picture

Thank you so much Tivie,

I think I'll follow your tip of not running it in my production site.