facebook getting user id from graph api via taggable_friends

前端 未结 5 754
死守一世寂寞
死守一世寂寞 2021-02-07 02:12

In v1.0 API I was able to get friends with their facebook ID like this:

{
      \"name\": \"Somename SomeSurname\", 
      \"id\": \"100007797060798\"
 }
         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-07 02:51

    /me/taggable_friends shows all friends in the list except for some. In one case, there are 326 friends in a profile but this only shows 317 and in another profile there are 194 friends in total but it only shows 182.

    $flist = $fb->api('/me/taggable_friends?fields=name,id&limit=1000');
    

    shows almost all friends in the list (despite the limit being too high) but leaves some of them in both cases. This might not work on the api explorer if your app is not approved and published but it will work for admins, testers and developers of your application.

    You cannot decode this id because that would defeat the purpose of encoding it in the first place.

    What I am also wondering is that whether it is possible to invite friends of a user to use the application?

提交回复
热议问题