Search code examples
facebookfacebook-graph-apipermissionsfacebook-timelinereview

Getting Facebook timeline


I am fetching my timeline from Facebook and I successfully able to get my timeline but when I login with my friend's Facebook account I received the following error-

{
  "error": {
    "message": "(#200) Requires extended permission: read_stream", 
    "type": "OAuthException", 
    "code": 200
  }
}

I am the admin of the application on Facebook developer but my friend is not. I have already approved following permissions from Facebook(see attached screen shot)

enter image description here And below is the permission which I am using in my code-

FBSession* sess = [[FBSession alloc] initWithPermissions:[NSArray arrayWithObjects:@"public_profile",@"user_friends",@"user_birthday",@"email",@"user_education_history",@"user_work_history",@"user_hometown",@"read_stream",@"user_about_me",@"user_posts",@"publish_actions",nil]];

And here is the code to getting the timeline-

 NSString *urlStringFacebook = [NSString stringWithFormat:@"https://graph.facebook.com/me/home?format=json&&access_token=%@&&limit=90",[[FBSession activeSession] accessTokenData]];

If I submit the read_stream permission to Facebbok for review the reject it due to the following reason(see screenshot below)-

enter image description here

And one more thing when I login with my account they ask me to allow for news feed(read_stream) permission but when my friend login they don't ask for that permission.

When I try to get the same thing on Graph API explorer then the data comes fine. Please let me know what I am missing in the whole process. Thanks


Solution

  • Use /me/feed instead of /me/home, with the already granted user_posts permission this should work. This endpoint also returns other posts from the user's timeline, not only those from the user himself (/me/posts)...