简体   繁体   English

Facebook Graph API - 使用应用程序的朋友

[英]Facebook Graph API - Friends using application

Is there a function in the Facebook.php library for getting friends of the user using a certain application. Facebook.php库中是否有一个函数可以使用某个应用程序获取用户的朋友。 Something like: 就像是:

$friends = $facebook->api('me/friends?access_token=' . $access_token);

But instead of listing all friends, it just lists friends using the same application. 但不是列出所有朋友,而是列出使用相同应用程序的朋友。

您应该可以使用FQL执行此操作:

select uid, name, is_app_user from user where uid in (select uid2 from friend where uid1=me()) and is_app_user=1

You can always make request with App token to url: 您始终可以使用App令牌向url发出请求:

https://graph.facebook.com/user_id/friends?fields=id,name,installed

And then just filter user by installed param For user friends you can do the same but with client token. 然后只需按已安装的参数筛选用户对于用户朋友,您可以使用客户端令牌执行相同操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM