开发者

Check isfriend using facebook Graph API?

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

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜