在Facebook Graph API中,获取用户电子邮件地址的API调用是什么

The*_*193 2 get facebook-graph-api

这里我只是通过rest客户端发送GET请求.它只返回用户ID和名称.另外,如何仅使用GET请求检索用户的电子邮件?

https://graph.facebook.com/me?access_token= [用户访问令牌]

lus*_*chn 7

https://graph.facebook.com/me?fields=name,email&access_token=[User's access token]
Run Code Online (Sandbox Code Playgroud)

它被称为"声明字段",随附图谱API的v2.4:https://developers.facebook.com/docs/apps/changelog#v2_4

API Explorer测试:https://developers.facebook.com/tools/explorer/?method = GET&path = me%3Ffields%3Dname%2Cemail

当然,您需要使用包含email权限/范围的用户令牌.在这里调试您的令牌:https://developers.facebook.com/tools/debug/accesstoken/