Hey,
Well at the current moment I'm attempting to get the mutual friends between two users, and then pick a random one of those. It then gets the name of the random mutual friend, but it's not working for some reason.
here's what I have (where $lg_userid is the logged in users id, and $target_id is the friend, I then get the mutual friends between them and pick a random one)
$common = $facebook->api_client->friends_getMutualFriends($lg_userid,$target_id);
$one_common = array_slice(array_shuffle($common), 0, 1);
$common_user_details = $facebook->api_client->users_getInfo($one_common, array('first_name'));
$firstnamecommon = $common_user_details['first_name'];
It's giving me this error
Error message: The underlying FQL query made by this API call has encountered the following error: Can't lookup all friends of (not logged in user id); can only lookup for the logged in user (logged in user) or for pairs of users Error code:13
Not really sure what I'm doing wrong, could anyone help me out?
Thanks!