How to get user posts using Graph API?

前端 未结 2 592
时光取名叫无心
时光取名叫无心 2021-01-05 04:44

I want to fetch all the public posts from a user\'s wall with my user access token. I know that read_stream permission is required for this. However this permission has been

2条回答
  •  难免孤独
    2021-01-05 05:20

    Use the /me/posts endpoint with the user_posts permission:

    We have a new permission user_posts that allows an app to access the posts on a person's Timeline. This includes the someone's own posts, posts they are tagged in and posts other people make on their Timeline. Previously, this content was accessible with the read_stream permission. The user_posts permission is automatically granted to anyone who previously had read_stream permission.

    Source: https://developers.facebook.com/docs/apps/changelog#v2_3

    That´s all you can get, there is no way to get the whole feed anymore. It does not matter if the posts are public or not btw.

    You need to use a User Token with the user_posts permission, debug your Token and make sure it includes that permission: https://developers.facebook.com/tools/debug/

    More information about Tokens:

    • https://developers.facebook.com/docs/facebook-login/access-tokens
    • http://www.devils-heaven.com/facebook-access-tokens/

提交回复
热议问题