PHP Classes

Linkedin groups

Recommend this page to a friend!

      PHP OAuth Library API  >  All threads  >  Linkedin groups  >  (Un) Subscribe thread alerts  
Subject:Linkedin groups
Summary:Retrieving Linkedin group posts with PHP OAuth API
Author:Mattias Svensson
Date:2013-01-28 18:48:50
Update:2013-01-30 14:12:26

  1. Linkedin groups   Reply   Report abuse  
Mattias Svensson - 2013-01-28 18:48:50
Hi, this API is working great, when I tested out the login_with_linkedin.php. Now I was wondering if it is possible to modify the code in login_with_linkedin.php and use the API to retrieve group posts?

I added rw_groups to line 25 to give permission to "retrieve and post group discussions as you". Then I've tried to play around with{group-id}/posts:(creation-timestamp,title,summary,creator:(first-name,last-name,picture-url,headline),likes,attachment:(image-url,content-domain,content-url,title,summary),relation-to-viewer)?category=discussion&order=recency&count=5 from the Linkedin API site on line 42 where you call CallAPI(). I keep getting this error though:

Error: it was not possible to access the API call: it was returned an unexpected response status 403 Response: { "errorCode": 0, "message": "Access to groups denied", "requestId": "SLDJMUFQXY", "status": 403, "timestamp": 1359394328949 }

Any idea? Thanks!

  2. Re: Linkedin groups   Reply   Report abuse  
Manuel Lemos - 2013-01-30 08:19:13 - In reply to message 1 from Mattias Svensson
When you obtain a token with certain permissions, you cannot use it to access an API resource that requires more permissions.

You need to restart the process to obtain a new token with the right permissions. You may need to call the ResetAccessToken function to force the user to go through the authorization process again.

  3. Re: Linkedin groups   Reply   Report abuse  
Mattias Svensson - 2013-01-30 14:12:26 - In reply to message 2 from Manuel Lemos
Ah, that's where the problem was. Now it's working. Thank you, Manuel!

Keep up the good work!