PHP Classes

Linkedin Newtrok Updates

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  Linkedin Newtrok Updates  >  (Un) Subscribe thread alerts  
Subject:Linkedin Newtrok Updates
Summary:Newtrok Updates Share
Messages:10
Author:Utpal Das
Date:2013-08-22 10:28:21
Update:2013-08-23 07:27:54
 

  1. Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Utpal Das Utpal Das - 2013-08-22 10:28:21
Hello, First of all thanks for the script.

I am using the below code to get network updates but when running the code then nothing is displaying on the page. Please help me how can i solve the issue.

$success22 = $client->CallAPI(
'http://api.linkedin.com/v1/people/~/network/updates?type=SHAR',
'GET',
array(
'oauth_access_token' => $client->access_token,
'oauth_secret_token' => $client->access_token_secret,
'scope' => $client->scope,
'format'=>'json',
),
array(
'FailOnAccessError'=>true,
'ConvertObjects' => true,
'Type' => 'Data'
),
$user22
);
print_r($user22);

Thanks in advance.

Regards.

  2. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2013-08-22 10:45:50 - In reply to message 1 from Utpal Das
That is because it is failing for some reason.

Check the access_token_error and the authorization_error variables. They should tell you more about why the API call failed.

  3. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Utpal Das Utpal Das - 2013-08-22 10:54:41 - In reply to message 2 from Manuel Lemos
Thanks for your reply.

right now i am getting the below error message:

Array ( [errorCode] => 0 [message] => Wrong value of scope {r_fullprofile r_emailaddress r_contactinfo rw_nus rw_groups w_messages} expected [self|network] [requestId] => U5PRA7IR72 [status] => 403 [timestamp] => 1377168759545 )

Can you please tell me how can i check the access_token_error and the authorization_error variables.

Regards.

  4. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2013-08-22 11:26:20 - In reply to message 3 from Utpal Das
That means you have not set the scope parameters to the correct value to perform that API call.

This page says it must be self.

developer.linkedin.com/documents/ge ...


  5. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Utpal Das Utpal Das - 2013-08-22 11:44:56 - In reply to message 4 from Manuel Lemos
Hello, Thanks for reply. Now i am getting network updates but the return values are displaying in very weird format. Can you please tell me how can i get those values in array format.

Regards.

  6. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Utpal Das Utpal Das - 2013-08-22 16:47:29 - In reply to message 5 from Utpal Das
Hello Sir, Below is the format which i am getting right now from network updates. Can you please tell me how can i make a simple format to display in webpage.

Array ( [_total] => 4 [values] => Array ( [0] => Array ( [isCommentable] => 1 [isLikable] => 1 [isLiked] => [numLikes] => 0 [timestamp] => 1377119154259 [updateComments] => Array ( [_total] => 0 ) [updateContent] => Array ( [person] => Array ( [apiStandardProfileRequest] => Array ( [headers] => Array ( [_total] => 1 [values] => Array ( [0] => Array ( [name] => x-li-auth-token [value] => name:ERz9 ) ) ) [url] => http://api.linkedin.com/v1/people/SHjLJ9ugFX ) [currentStatus] => tetsing2 [firstName] => Utpal [headline] => Self [id] => SHjLJ9ugFX [lastName] => Das [siteStandardProfileRequest] => Array ( [url] => http://www.linkedin.com/profile/view?id=265731749&authType=name&authToken=ERz9&trk=api*a293809*s301373* ) ) ) [updateKey] => UNIU-265731749-5776056377176752128-SHARE [updateType] => STAT ) [1] => Array ( [isCommentable] => 1 [isLikable] => 1 [isLiked] => [numLikes] => 0 [timestamp] => 1377118881365 [updateComments] => Array ( [_total] => 0 ) [updateContent] => Array ( [person] => Array ( [apiStandardProfileRequest] => Array ( [headers] => Array ( [_total] => 1 [values] => Array ( [0] => Array ( [name] => x-li-auth-token [value] => name:ERz9 ) ) ) [url] => http://api.linkedin.com/v1/people/SHjLJ9ugFX ) [currentStatus] => testing again [firstName] => Utpal [headline] => Self [id] => SHjLJ9ugFX [lastName] => Das [siteStandardProfileRequest] => Array ( [url] => http://www.linkedin.com/profile/view?id=265731749&authType=name&authToken=ERz9&trk=api*a293809*s301373* ) ) ) [updateKey] => UNIU-265731749-5776055232580567041-SHARE [updateType] => STAT ) [2] => Array ( [isCommentable] => [isLikable] => [timestamp] => 1377116412000 [updateContent] => Array ( [person] => Array ( [apiStandardProfileRequest] => Array ( [headers] => Array ( [_total] => 1 [values] => Array ( [0] => Array ( [name] => x-li-auth-token [value] => name:ERz9 ) ) ) [url] => http://api.linkedin.com/v1/people/SHjLJ9ugFX ) [connections] => Array ( [_total] => 1 [values] => Array ( [0] => Array ( [apiStandardProfileRequest] => Array ( [headers] => Array ( [_total] => 1 [values] => Array ( [0] => Array ( [name] => x-li-auth-token [value] => name:VOXM ) ) ) [url] => http://api.linkedin.com/v1/people/1v9BBvR-px ) [firstName] => D [headline] => Director of Career Services at docckolkata [id] => 1v9BBvR-px [lastName] => Roy [pictureUrl] => http://m.c.lnkd.licdn.com/mpr/mprx/0_EBP1Xfb-024oANHnXAA8XSLpgEO6PtHnHzbuXuv_C7o9u9096l_0E23SPXYJrvdswNlDIIwfRxXj [siteStandardProfileRequest] => Array ( [url] => http://www.linkedin.com/profile/view?id=62432152&authType=name&authToken=VOXM&trk=api*a293809*s301373* ) ) ) ) [firstName] => Utpal [headline] => Self [id] => SHjLJ9ugFX [lastName] => Das [siteStandardProfileRequest] => Array ( [url] => http://www.linkedin.com/profile/view?id=265731749&authType=name&authToken=ERz9&trk=api*a293809*s301373* ) ) ) [updateKey] => CONN-265731749-*2-*1 [updateType] => CONN ) [3] => Array ( [isCommentable] => [isLikable] => [timestamp] => 1377116409000 [updateContent] => Array ( [person] => Array ( [apiStandardProfileRequest] => Array ( [headers] => Array ( [_total] => 1 [values] => Array ( [0] => Array ( [name] => x-li-auth-token [value] => name:ERz9 ) ) ) [url] => http://api.linkedin.com/v1/people/SHjLJ9ugFX ) [connections] => Array ( [_total] => 1 [values] => Array ( [0] => Array ( [apiStandardProfileRequest] => Array ( [headers] => Array ( [_total] => 1 [values] => Array ( [0] => Array ( [name] => x-li-auth-token [value] => name:GCRj ) ) ) [url] => http://api.linkedin.com/v1/people/N5Ka7gtwKa ) [firstName] => debasish [headline] => -- [id] => N5Ka7gtwKa [lastName] => roy [pictureUrl] => http://m.c.lnkd.licdn.com/mpr/mprx/0_9G8uJ8wOAiy0crOGn5TxJiOxP_VjzvOGqQN1JiSauLaDoAdCsXK8B_JhgmsGnt0ac3Ct9kPiuIux [siteStandardProfileRequest] => Array ( [url] => http://www.linkedin.com/profile/view?id=172835067&authType=name&authToken=GCRj&trk=api*a293809*s301373* ) ) ) ) [firstName] => Utpal [headline] => Self [id] => SHjLJ9ugFX [lastName] => Das [siteStandardProfileRequest] => Array ( [url] => http://www.linkedin.com/profile/view?id=265731749&authType=name&authToken=ERz9&trk=api*a293809*s301373* ) ) ) [updateKey] => CONN-265731749-*2-*1 [updateType] => CONN ) ) )

Regards.

  7. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2013-08-22 20:41:05 - In reply to message 6 from Utpal Das
That is an array. You should not display it. You just access the array values that you need.

  8. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Utpal Das Utpal Das - 2013-08-22 20:47:24 - In reply to message 7 from Manuel Lemos
Hello, Thanks for your reply. I have tried to get the values from array but not able. Can you please tell me how can i get the "currentStatus" value from array.

Regards.

  9. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2013-08-23 01:51:35 - In reply to message 8 from Utpal Das
You may need to study better PHP arrays here:

php.net/manual/en/language.types.ar ...

  10. Re: Linkedin Newtrok Updates   Reply   Report abuse  
Picture of Utpal Das Utpal Das - 2013-08-23 07:27:54 - In reply to message 9 from Manuel Lemos
Hello, Thanks for your reply.

Regards.