Get the Friends of my friend using the Graph API

后端 未结 4 482
有刺的猬
有刺的猬 2020-12-10 09:09

I am trying to do a very basic thing with the new Graph API.

I already know how to get my friends: \"https://graph.facebook.com/me/friends?access_token=4333ed34d...\

4条回答
  •  感动是毒
    2020-12-10 09:18

    If I try to get friends of a random user I get HTTP 500 but it contains this response:

    {
       "error": {
          "type": "Exception",
          "message": "(#604) Can't lookup all friends of . Can only lookup for the logged in user (), or friends of the logged in user with the appropriate permission"
       }
    }
    

    which is pretty self-explanatory.

    If I try to get friends of my friend who allows viewing his other friends it works fine. If my friend chose to not allow viewing his other friends I get the same error.

提交回复
热议问题