2010-12-17 130 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