Facebook Graph API - accessing User's friend's posts

守給你的承諾、 提交于 2020-01-05 04:03:58

问题


I am trying to use Facebook Graph API to access a user's friends' posts. I have read many threads discussing this. Some state that it is not possible anymore. Some state that it is possible if the friend of the user is also a user of the app.

So now, I am trying this method. User 1 and user 2 are both using my app. (let's call user 1 = X and user 2 = Y) They have granted "user_posts" permission to my app. Then my app gets an access token from X , on X's device. (I believe there is no way of getting an access token from Y from X's device) In this case, how can I retrieve Y's posts using the API.

In the following question's answers, I find:

question from stackoverflow

From a user access token, you can only get feed of that user and his facebook friends who are users of this app. Also all those users must grant user_posts permission to your app otherwise it will return only empty data set like in your case

For other users ( who have granted user_posts permission and friend of current access token user ) feed use: /{user_id}/feed

But when I try this , I get an empty data. So what is the problem here ?

来源:https://stackoverflow.com/questions/41955548/facebook-graph-api-accessing-users-friends-posts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!