tepkool01 / simple-linkedinphp

Automatically exported from code.google.com/p/simple-linkedinphp
0 stars 0 forks source link

Update library to work with the latest LinkedIN API #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For once, it needs to support the new scope authentication parameter:
https://developer.linkedin.com/documents/authentication

Original issue reported on code.google.com by so...@readyforce.com on 9 Aug 2012 at 3:01

GoogleCodeExporter commented 9 years ago
An Joomla Plugin I am using, JLinked relies on this LinkedIn API wrapper.  
The change in authentication requires a "scope" variable to return some fields 
now outside what LinkedIn considers basic profile fields.  

Original comment by bernardo.gregory@gmail.com on 12 Aug 2012 at 1:35

GoogleCodeExporter commented 9 years ago
The documentation is found here
https://developer.linkedin.com/documents/authentication#granting

in linkedin_3.2.0.class.php I addressed this by replacing 
$response = $this->fetch(self::_METHOD_TOKENS, self::_URL_REQUEST, NULL, 
$parameters);

with this

$response = $this->fetch(self::_METHOD_TOKENS, self::_URL_REQUEST . 
'?scope=r_basicprofile+r_emailaddress', NULL, $parameters);

Original comment by oasis.fr...@gmail.com on 8 Sep 2012 at 1:15

GoogleCodeExporter commented 9 years ago
Then in demo.php you have to request the email address.

$response = 
$OBJ_linkedin->profile('~:(id,first-name,last-name,picture-url,email-address)');

Original comment by oasis.fr...@gmail.com on 8 Sep 2012 at 1:18

GoogleCodeExporter commented 9 years ago
Forgot to add the links to the documentation on all the fields

https://developer.linkedin.com/documents/profile-fields

Original comment by oasis.fr...@gmail.com on 8 Sep 2012 at 3:17

GoogleCodeExporter commented 9 years ago
GRACIAS. #2

Original comment by timsel...@gmail.com on 6 Oct 2012 at 11:27

GoogleCodeExporter commented 9 years ago
I made a small patch that fixes this in the call your making to request 
authorisation.

Usage: 
$tokenResponse = $linkedin->retrieveTokenRequest('r_fullprofile'); // for the 
full profile
or
$tokenResponse = $linkedin->retrieveTokenRequest(); // for the default.

File is attached.

Original comment by ter...@gmail.com on 23 Jan 2013 at 2:59

Attachments: