我试图在我的应用程序的服务器端获得生日。
我已经有["user_birthday"]
登录请求的权限。
但是现在在服务器上,我想我需要做类似的事情。
userBirtdhay = "https://graph.facebook.com/me?fields=birthday&" + user.services.facebook.id;
但是,结果类似。
https://graph.facebook.com/me?fields=birthday&10146450841965723dffsadf
如果您转到网址,则会看到一个
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500
}
}
经过一些研究后me
,URL上的空间应该是我的accessToken,所以我尝试使用。
https://graph.facebook.com/longAccesToken?fields=birthday&
但是现在又回来了。
"message": "(#803) Some of the aliases you requested do not exist:
这是正确的:
https://graph.facebook.com/me?fields=birthday&access_token=[your-user-token]
您应该开始阅读有关访问令牌和API端点的Facebook文档。您可以使用API Explorer测试API。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句