我需要帮助才能获取Facebook用户的电子邮件。这是我所做的。如何使用graph api查询Facebook用户的电子邮件?
https://graph.facebook.com/me?scope=email&access_token=xxxxxxxxxxxxxxxx
结果我回到中没有任何邮件。
{
"id": "7027110",
"name": "John Mike",
"first_name": "John",
"last_name": "Mike",
"link": "http://www.facebook.com/john.mike",
"username": "john.mike",
"location": {
"id": "11241875545",
"name": "Oakland, New Jersey"
},
"gender": "male",
"timezone": -5,
"locale": "en_US",
"verified": true,
"updated_time": "2011-12-07T16:53:47+0000"
}
也试图将scope = email更改为fields = email,仍然无效。缺少什么,请帮助我
我不认为你的意思是能够获得这些信息。它对普通用户不可用。它也会导致严重的垃圾邮件问题。 – Polynomial
这可能是因为他们没有公开电子邮件:(这里试试这个: 'https://graph.facebook.com/me/fql?access_token=<你的访问令牌>&q =选择%20name,email %20from%20user%20where%20uid = me()' 或 'https://graph.facebook.com/me/fql?access_token=<您的访问令牌>&q =选择%20name,电子邮件%20from%20user% 20 where%20uid%20in%20(select%20uid2%20from%20friend%20where%20uid1%20 = me())' –
无论我做了什么都是正确的,但是,我没有权限查询用户的电子邮件。第一次用户登录时,我需要询问他是否允许我进入。 – qinking126