开发者

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

开发者 https://www.devze.com 2023-02-01 14:03 出处:网络
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 network; I didn\'t see such

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 network; I didn't see such information. Simply,开发者_如何学JAVA if a user is in "Google" network, may I get the name and the ID of the networks that the user belongs to?

If this is not possible, may I reach the user's secondary email addresses?

Thanks for your help.


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

精彩评论

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