[英]How to get profile Id of user's friends using Graph API
We want only the Public Profile ID of user's friends. 我们只需要用户朋友的公开资料ID。 User in our case is the end user who signs up our Android App and we store their access token every time they log in. We current have user's public profile ID and his user access token.
在我们的情况下,用户是注册我们的Android应用程序的最终用户,我们在每次登录时都会存储他们的访问令牌。我们当前拥有用户的公共资料ID和他的用户访问令牌。
We are creating a timeline for our application and thus we would require public profile id of all user's friends and insert into our MySQL DB so as to keep track of the social circle. 我们正在为我们的应用程序创建一个时间表,因此我们将需要所有用户朋友的公开个人资料ID,并将其插入我们的MySQL数据库中,以便跟踪社交圈。
Any other solution to implement timeline is acceptable. 任何其他实现时间表的解决方案都是可以接受的。
Note: As pointed out in answer, facebook is no longer allowing developers to access user's friends' data. 注意:正如答案中指出的那样,facebook不再允许开发人员访问用户朋友的数据。
Since v2.0 of the Graph API, it is not possible to get access to all friends anymore. 从Graph API v2.0开始,就不可能再访问所有朋友了。 You can only get friends who authorized your App too with
/me/friends
. 您也只能与
/me/friends
一起获得对您的应用程序进行授权的/me/friends
。 More information: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app 详细信息: Facebook Graph Api v2.0 +-/ me / friends返回空,或者仅返回也使用我的应用程序的朋友
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.