Topic-icon Additional API Authorisations for Linkedin

Active Subscriptions:

None
12 years 2 months ago #42395 by marfin
In the previous JLinked component I was able to add additional Authorisations for the Linkedin API. I have now had to upgrade to JFBConnect but I cannot see this feature (but can see it for Facebook API). Have I missed it? Or do I have to edit some files ... right now my users are missing Linkedin features and I need to fix it try to downgrade back to JLinked ;(
The topic has been locked.
Support Specialist
12 years 2 months ago #42397 by alzander
Don't downgrade. It'd be better to stick with JFBConnect and let us help you add that feature back. We'll also make sure it becomes an option in the next release.

First, there are only a few permissions that can be granted with LinkedIn. Facebook has a much more granular system. You can see all the permissions that LinkedIn allows below:
developer.linkedin.com/documents/authentication#granting

Specifically, JFBConnect will select the permissions based on the Profile mappings you've selected, and that can be r_fullprofile and/or r_contactinfo. r_emailaddress is *always* set as required by JFBConnect.

With all that said, to add another permission, edit the /components/com_jfbconnect/libraries/profile/linkedin.php file. Around line 173, you'll see:
self::$requiredScope = array_unique(self::$requiredScope);
self::$requiredScope = implode(",", self::$requiredScope);
Update that to:
self::$requiredScope[] = 'w_messages';
self::$requiredScope[] = 'rw_nus';
self::$requiredScope = array_unique(self::$requiredScope);
self::$requiredScope = implode(",", self::$requiredScope);
That will add w_messages and rw_nus to the required scope for all users.

Let me know how that goes,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #42409 by marfin
Thanks, I had just found a fix before your replied :)

I had seen that line 164 of /components/com_jfbconnect/libraries/profile/linkedin.php file was looking for $customPermsSetting from a database field not created in the new table yet, I just set this to be the value I had previously set in jlinked

It seems to work. Glad I don't have to try and downgrade

Regards
The topic has been locked.
Support Specialist
12 years 2 months ago #42410 by alzander
Nice sleuthing. Yeah, the code to insert additional permissions is still there (as you found), we just didn't add the setting back apparently. Again, the config area parameter will be in the next release as well.

Glad we could help and definitely glad you didn't downgrade.

Of course, if you run into any other issues with LinkedIn functionality, or JFBConnect in general, just let us know.

Thanks,
Alex
The topic has been locked.