[英]Getting facebook mutual friends of some users (not my friends)
I am trying to get mutual friends count of users that aren't my friends. 我试图让不是我的朋友的用户成为共同的朋友。
This is the code (after auth.): 这是代码(经过身份验证后):
$fb_result = $facebook->api('/me/mutualfriends/'.$other_user_fb_id);
But when looping this code over 10-20 users it is too long\\slow. 但是,当将此代码循环到10-20个用户时,它太长/太慢。
Is there any other method? 还有其他方法吗?
something like: 就像是:
$fb_result = $facebook->api('/me/mutualfriends/'.user_fb_id1.','.user_fb_id2.','.....);
You can use: 您可以使用:
$fb_result = $facebook->api("/{$user_fb_id2}/mutualfriends/{$user_fb_id1}");
Note that, the user: user_fb_id2
must be the user of your application for this to work. 请注意,用户:
user_fb_id2
必须是您的应用程序用户,此功能才能起作用。
UPDATE: You can use FQL Queries and Batch requests for this purpose. 更新:为此,您可以使用FQL查询和批处理请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.