2010-12-17 123 views

回答

3

你可以使用下面的API調用的朋友列表:

Friends: https://graph.facebook.com/me/friends?access_token=... 

,然後在列表中找到您要尋找的人的搜索。

此處是指更詳細的文檔:http://developers.facebook.com/docs/api

+24

我可以應用過濾器這個API ..意味着我只想在我的朋友中搜索「AMIT」。 。 。 。 。 https://graph.facebook.com/search?q=Amit&type=user此API搜索用戶AMIT,但它公開搜索,但我只想在朋友列表中搜索 – 2011-06-08 05:52:08

+0

同意@AmitBattan,我沒有在Facebook文檔要做到這一點,這很奇怪。做得很好的Facebook,做得很好... – Ionut 2017-09-27 08:11:05

6

您可以搜索朋友的名字是這樣的:

select uid, name, sex 
from user 
where uid in (SELECT uid2 FROM friend WHERE uid1 = me()) 
and (strpos(lower(name),'TheFriendName')>=0 OR strpos(name,'TheFriendName')>=0) 

TheFriendName =全名或姓名

例的一部分:

select uid, name, sex 
from user 
where uid in (SELECT uid2 FROM friend WHERE uid1 = me()) 
and (strpos(lower(name),'Jack')>=0 OR strpos(name,'Jack')>=0) 
+0

這對我來說是個訣竅。非常感謝:) – Shabith 2013-05-11 07:47:24

+0

樂意幫忙:) – Ofear 2013-05-12 07:13:33

+3

*旁註:* FQL很快就會被棄用。閱讀[文檔](https://developers.facebook.com/docs/reference/fql/)瞭解更多詳情。 – Raptor 2014-06-10 06:41:57