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.
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.
UPDATE: You can use FQL Queries and Batch requests for this purpose.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.