問(wèn)題描述
我已經(jīng)玩了一周左右的 Facebook Graph API,仍然找不到如何獲取用戶的網(wǎng)絡(luò)信息?不知道Graph API是否存儲(chǔ)了用戶的網(wǎng)絡(luò);我沒(méi)有看到這樣的信息.簡(jiǎn)單來(lái)說(shuō),如果用戶在Google"網(wǎng)絡(luò)中,我是否可以獲取該用戶所屬網(wǎng)絡(luò)的名稱和 ID?
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, if a user is in "Google" network, may I get the name and the ID of the networks that the user belongs to?
如果這不可能,我可以聯(lián)系用戶的輔助電子郵件地址嗎?
If this is not possible, may I reach the user's secondary email addresses?
感謝您的幫助.
推薦答案
使用 FQL : User 表的 affiliations
字段包含此信息
Using FQL : the affiliations
field of the User table contains this information
示例調(diào)用:https://graph.facebook.com/fql?q=select affiliations from user where uid= 4&access_token=
示例響應(yīng):
{
"data": [
{
"affiliations": [
{
"nid": 16777217,
"name": "Harvard",
"type": "college"
},
{
"nid": 50431648,
"name": "Facebook",
"type": "work"
}
]
}
]
}
這篇關(guān)于如何使用 Facebook Graph API 獲取用戶的網(wǎng)絡(luò)信息?(PHP)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!