开发者

searching friends using facebook graph api

开发者 https://www.devze.com 2023-01-31 13:50 出处:网络
Does facebook have an api for 开发者_JAVA百科searching a user\'s friend? TimYou can search friend\'s name like this:

Does facebook have an api for 开发者_JAVA百科searching a user's friend?

Tim


You can search friend's name like this:

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=Full name or part of the name

Example:

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)


You can get the list of friends using the following API call:

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

and then search in the list for the person you are looking for.

Refer to more detailed documentation here: http://developers.facebook.com/docs/api

0

精彩评论

暂无评论...
验证码 换一张
取 消