问题
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