Theoretically, you can get a list of user's friends using:
$friendsOfFriend = $facebook->api('/'.$yourFriendsFacebookId.'/friends');
You can then check each result to see if they are also your friend.
$isMyFriend = $facebook->api('/me/friends/'.$someonesFacebookId);
... and track the score.
However, my test has not yet returned the result. I tried to get some friends of my friends on facebook, but it returns an exception: Can't lookup all friends of {friend's_facebook_ID}. Can only lookup for the logged in user {my_facebook_ID}, or friends of the logged in user with the appropriate permission
Can't lookup all friends of {friend's_facebook_ID}. Can only lookup for the logged in user {my_facebook_ID}, or friends of the logged in user with the appropriate permission
. So there might be a rights issue here.
source share