0

Say you have a facebook page like:

http://www.facebook.com/example.name.1

How can I programmatically get the friend list of this page via get request.

If I can test this using the facebook console it would be very helpful.

4

1 回答 1

1

这是获取您的朋友列表的代码。因此,您可以从研究以下代码开始。

$friends = $facebook->api("/me/friends")

或者你也可以使用 sql 来检索好友列表。

$friends = $facebook->api(array(
"method"    => "fql.query",
"query"     => "SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())"
));
于 2013-03-31T22:22:58.653 回答