fetching list of friends using facebook 2.0

℡╲_俬逩灬. 提交于 2019-12-01 08:32:04

问题


is there any way to fetch list of friends using facebook 2.0 API? I was reading this upgrade from the API and it seems it is quite difficult to fetch the friends now, but I have seen 2 permissions

  • read_friendlist
  • user_friends

Is their any way to fetch list of friends? and what about the widgets that get friends from facebook, will they go down?


回答1:


In v2.0 of the Graph API /me/friends returns the user's friends who also use the app. You need to be granted the user_friends permission in order to get even app-using friends.

There is no way in v2.0 to get the full user's friends.

However, you may use the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends API or the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends APIs to get all the user's friends with tokens than can be used for tagging and inviting.

the read_friendlist perm doesn't get you a list of the user's friends, it gets you the list of a user's friendlists which may be used to build a custom privacy selector when publishing stories to Facebook.




回答2:


As of 4/30/2014, you can only retrieve the friends who also use the app.

There are, however, specific methods for apps in the 'Game' category for inviting friends. https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends/



来源:https://stackoverflow.com/questions/23435961/fetching-list-of-friends-using-facebook-2-0

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