简体   繁体   English

Facebook的朋友的朋友

[英]Facebook friends-of-friends

How can I get the Facebook ids of the current logged in user's second degree friends or friends-of-friends? 如何获得当前已登录用户的二级学位朋友或亲朋好友的Facebook ID?

Sample sites that do the same behaviour are the following: 具有相同行为的示例站点如下:

  • vark.com vark.com
  • thread.com thread.com

将朋友存储在一个数组中,然后自己进行相交。

Following daaku's answer, it's technically not possible to get the friends of every friend. 按照daaku的回答,从技术上讲,不可能结识每个朋友的朋友。 It is a limitation in the API. 这是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). 但是,我检查了thread.com,看来在该特定网站上您必须使用您的Facebook帐户(用户名+密码)登录。

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) 如您所知,您实际上可以在facebook Web界面中看到一个朋友的所有朋友(当您在浏览器中查看他们的个人资料时)

Knowing that, this is how I think they do it: 知道这一点,这就是我认为他们的做法:

  • With an embedded browser in a background-application on their server, they log on to your facebook. 在服务器的后台应用程序中使用嵌入式浏览器后,他们登录到您的Facebook。
  • they navigate through the friends of every friend 他们浏览每个朋友的朋友
  • they extract the necessary information (probably at least the username and id from this page) 他们提取必要的信息(可能至少是此页面的用户名和ID)
  • voila. 瞧。

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 TOS,并且也不符合道德规范:您绝对不应要求用户提供其Facebook密码。

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 尽管给定了两个Facebook用户ID,但您可以使用以下方法检查他们是否是朋友: http//developers.facebook.com/docs/reference/fql/friend

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM