Facebook 朋友的朋友
如何获取当前登录用户的二级好友或好友的好友的 Facebook id?
执行相同行为的示例站点如下:
- vark.com
- thread.com
How can I get the Facebook ids of the current logged in user’s second degree friends or friends-of-friends?
Sample sites that do the same behaviour are the following:
- vark.com
- thread.com
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将朋友存储在数组中,然后自己进行相交。
Store the friends in an array then do the intersect yourself.
按照daaku的回答,技术上不可能得到每个朋友的朋友。
这是 API 的限制。 (可能是为了阻止滥用者发送大量垃圾邮件等)
但是,我查看了 thread.com,似乎在这个特定网站上您必须使用您的 Facebook 帐户(用户名 + 密码)登录。
正如您可能知道的那样,您实际上可以在 Facebook 网络界面中看到朋友的所有朋友(当您在浏览器中查看他们的个人资料时)
知道这一点,我认为他们就是这样做的:
然而,我认为这违反了 Facebook 的 TOS,而且也不道德:任何时候都不应该向用户询问他们的 Facebook 密码。
Following daaku's answer, it's technically not possible to get the friends of every friend.
It is a limitation in the API. (Probably to block abusers from sending much spam etc.)
However, I checked out thread.com and it seems that on this particular website you have to log in with your facebook account (username + password).
As you probably know, you can actually see all the friends of a friend in the facebook web interface (when you're viewing their profile in a browser)
Knowing that, this is how I think they do it:
However, I think this violates the facebook TOS, and it's also not ethical: at no time should you ask a user for their facebook password.
无法获取朋友的朋友列表。不过,给定两个 Facebook 用户 ID,您可以使用以下命令检查他们是否是朋友: http:// Developers.facebook.com/docs/reference/fql/friend
It is not possible to get a listing of friends of friends. Although, given two Facebook user ids you can check if they are friends using: http://developers.facebook.com/docs/reference/fql/friend