如何使用graph api查询facebook用户的电子邮件?

qin*_*126 5 email facebook 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"
            }
Run Code Online (Sandbox Code Playgroud)

还尝试将scope = email更改为fields = email,仍然无法正常工作.什么不见​​了,请帮帮我

ngu*_*yên 7

您可以像这样获得用户电子邮件: https://graph.facebook.com/v2.5/me?fields=id,name,email 更多细节请转到此处


Igy*_*Igy 1

您是否获得了email用户的扩展权限?您可以通过调用来检查您的访问令牌已被授予哪些权限/me/permissions