facebook graph api..get friends of friends

前端 未结 3 1345
囚心锁ツ
囚心锁ツ 2020-12-31 07:41

I am using the FB graph api to get a list of my friends\' friends using:

https://graph.facebook.com//friends?access_token=
         


        
3条回答
  •  忘掉有多难
    2020-12-31 08:08

    I got friends of friends(limited). I had same problem. Though it is very late for answering question, it will help somebody. That's why answering this question.

    We can get friends of friends those are app users. Try by this fql query.

    $fb_id= user id whose friends of friends required.

    $query="SELECT uid, name, work_history  FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 IN (SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = $fb_id ) and is_app_user=1) )";
            $user_info=$facebook->api(array('method'=>'fql.query',
                        'query'=>$query));
    

提交回复
热议问题