我尝试获取此文档中的access_token:https://developers.facebook.com/docs/authentication/server-side/
但它不起作用!
我有这个错误:
{
"error": {
"type": "OAuthException",
"message": "Error validating verification code."
}
}
在文档中我们可以使用:
https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&
client_secret=YOUR_APP_SECRET&code=THE_CODE_FROM_ABOVE
client_id是我的app_id
client_secret是App秘密
redirect_uri是网站的网址(应用配置中的网站网址)(我尝试使用/并且最终没有)
所以我的网址是:
https://graph.facebook.com/oauth/access_token?client_id=14588084****&redirect_uri=http%3A%2F%2Fwww.mywebsite.com&client_secret=693ce9538e1f14e0*********&code=AQCVmlM9peMiL8Pv3mdi7c3FifwGLQDECdtN0oGMW4I6cisebeawDdSHP_crQlhsZxHKDOFT6zOrqeaoiL2pkQSkqAvwoPZdw0o1uCoLpUVjchghgfhgfhEXb2XS3UBD7iEc8eZ_YLF0cbVWL5i58sj3Rsr9vVFtfYwfghghgfhgfTkwajGcRp9n-lWWcepxghgIwzMMYLv8e__iDoMDiSNg