skip to Main Content

So I was very happy when Facebook approved my Chrome Extension app. Basically, it allows you to import your data from facebook into the local_storage in Chrome, then you can easily search your old posts. While it works like a charm for my account, when I switch to another account, login, approve the Facebook request for permissions, my user_feed data is empty. I am at a loss.

I am able to get user info, the image of the user, his/her name, etc. and I am able to retrieve an access token. But, when I make the call to the feed, it comes back empty:

https://graph.facebook.com/me/feed?access_token=EAAcu…&expires_in&limit=50&offset=1&fields=message,likes,story,created_time,link

(I have also tried injecting the ID for “me”). Again, this works great when it’s my FB account (also the developer account). So, I don’t think it is my code, the only thing that changes is the user…

Perhaps it takes a certain amount of time for the Facebook API to work even after Facebook approves your permissions request??

2

Answers


  1. Chosen as BEST ANSWER

    Got it. I didn't see this anywhere in the documentation, but in addition to having your app's permissions approved by facebook, you must also include the scope as a query parameter: https://www.facebook.com/dialog/oauth?client_id=${appId}&scope=user_posts&response_type=token&redirect_uri=http://someresponse.com

    If anyone sees this in the documentation, please let me know.


  2. Use the Access Token Debugger Tool to see if the access token that you are getting back has user_posts permission listed under “Scopes”. If it is not present, then you cannot use that access token to fetch the user’s feed.

    Note that user_posts permission requires approval prior to usage. If you are not approved, it will only work for people who have admin/developer role in your app.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search