How to get user's network information using Facebook Graph API? (PHP)

前端 未结 1 1418
南旧
南旧 2020-12-18 09:54

I have been playing with Facebook Graph API around a week, and I still could not find how to get user\'s network information? I don\'t know if the Graph API stores user\'s n

相关标签:
1条回答
  • 2020-12-18 10:31

    Using FQL : the affiliations field of the User table contains this information

    Sample call: https://graph.facebook.com/fql?q=select affiliations from user where uid= 4&access_token=<ACCESS TOKEN>

    Sample response:

    {
      "data": [
        {
          "affiliations": [
            {
              "nid": 16777217, 
              "name": "Harvard", 
              "type": "college"
            }, 
            {
              "nid": 50431648, 
              "name": "Facebook", 
              "type": "work"
            }
          ]
        }
      ]
    }
    
    0 讨论(0)
提交回复
热议问题