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:
将朋友存储在一个数组中,然后自己进行相交。
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.
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.