-1

What I want to achieve

I want to display posts of a public facebook page on my website. For that reason it does not make sense to use a user access token, since it requires a login.

Possible Solution I found

I know you can use the App Tokens. There was a related question on Stackoverflow. I tested this using the Graph API Explorer.

https://graph.facebook.com/v2.3/google/statuses

returns: (#100) Requires user session

https://graph.facebook.com/v2.3/google/posts

returns: a valid result, but a totally different result than the same request with a User Access Token (less posts). same request for nike delivers a better result.

Questions

  • Why does the same request deliver two diferent results?
  • Can you only grab certain posts with the app token?
  • Under which conditions can you get the full timeline without user access token?
Community
  • 1
  • 1
oshell
  • 8,923
  • 1
  • 29
  • 47
  • 2
    Posts might f.e. be targeted to specific user groups (based on location, language, age, …) – and those you will only get using a user access token for a user that satisfies the targeting criteria. Using your app token, you will only get posts that “everyone” can see. – CBroe Jun 25 '15 at 14:21
  • seems reasonable. for me this wasn't understandable in the docs. I posted messages on a wall, which I think should be visible for everyone, yet I still do not retrieve them. – oshell Jun 26 '15 at 06:44

1 Answers1

3

It's all in the docs. There's a fundamental difference between posts and statuses, and the permission requirements are also well documented:

Quotes:

  • An access token is required to view publicly shared posts.
  • A user access token is required to retrieve posts visible to that person.
  • A page access token is required to retrieve any other posts.
Tobi
  • 31,405
  • 8
  • 58
  • 90
  • I understand that i cannot retrieve statuses. But why do I get less results on posts with a valid app token? – oshell Jun 25 '15 at 13:50
  • https://graph.facebook.com/v2.3/google/posts delivers two different results when using it with user token and app token. can you only grab certain posts with the app token? – oshell Jun 25 '15 at 14:01
  • I made posts on a wall, which should be visible to everyone, yet I still do not recieve them. I gave you an upvote, but it still does not explain, how I can solve my problem. – oshell Jun 26 '15 at 06:46