I got a user ID of my friend, at some time he remove开发者_如何学运维 me from my friend list, how can i check using API , whether the specific ID is my friend or not. Thanks
i solved by running this fql
$fql_areFriends = "SELECT uid1, uid2 FROM friend WHERE uid1=$user_Id AND uid2=[USER_ID_OF_THE_FRIEND]";
$friends = $client->api(array(
'method' => 'fql.query',
'access_token' => $user_access_token,
'query' => $fql_areFriends,
));
if($friends!=null){
echo 'You Are Connected to friend
}
else{
echo 'You Are Not Connected to friend
}
精彩评论