问题
i recently used Graph Api and Graph Secret and get Full Friends list from facebook. Now how to get Followers from facebook using graph api and secret ? any idea about it? previous i have using for get friend list using php sdk? please any one guide me? how to get facebook using Graph api and secret ?
回答1:
Please refer to the Facebook docs before posting such a broad question. You're not able to get the subscribers anymore, because it was deprecated with Graph API v2.0.
Furthermore, starting with v2.0 you'll also not be able to get all friends of a user anymore, only those which are also using your app. Additionally, this will never be possible with an app access token as you write, only with an user access token.
See
- https://developers.facebook.com/docs/apps/changelog#v2_0
- /me/subscribers and /me/subscribedto have been removed.
- The /me/friends endpoint no longer includes the full list of a person's friends. Instead, it now returns the list of that person's friends who are also using your app.
回答2:
You will need to pass access token while getting all the followers list. It would be like this:
graph.facebook.com/me/subscribers?method=get&access_token={urtoken}
To get other user followers, you'll have to use his access token not yours.
And make sure that you use https://
at the start of api url.
回答3:
To get the followers of the friend, you can use subscriber:
https://graph.facebook.com/<user_id>/subscribers
Get all the list of friends in an array, pass the each friend user id to above Graph API which will list all the profiles that are following this friend to another array.
来源:https://stackoverflow.com/questions/31651982/how-to-get-facebook-follower-using-graph-api-and-graph-secret