Facebook是否有用于搜索用户朋友的API?
添
答案 0 :(得分: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)
答案 1 :(得分:3)
您可以使用以下API调用获取朋友列表:
Friends: https://graph.facebook.com/me/friends?access_token=...
然后在列表中搜索您要查找的人。
请参阅此处的详细文档:http://developers.facebook.com/docs/api