为了获得访问令牌,来获得访问令牌Facebook的API
GET: https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID
&client_secret=YOUR_APP_SECRET
&redirect_uri=uri
我下面GET方法图形API试图浏览器
/oauth/access_token?client_id=XXXXX&client_secret=XXXXXXXXXXXXX&redirect_uri=http://XYZ.com/
但是在这里我得到错误:
{
"error": {
"message": "Missing authorization code",
"type": "OAuthException",
"code": 1
}
}
可以请您提出建议,应该通过什么样的代码参数。
/oauth/access_token?client_id=XXXXXX&client_secret=XXXXXXXXXXXXXXX&redirect_uri=http://XYZ.com/&code=??
通过使用你的上述url,我得到的响应像。 =的access_token | SJgcG4272bQmKz2Lbx_K5HRaQYU 但在使用本中的access_token以下网址, https://graph.facebook.com/search?limit=25&offset=50&type=user&q=srihari&access_token=1416550685225787|SJgcG4272bQmKz2Lbx_K5HRaQYU 现在,我得到错误等: { “错误”:{ “消息”: “(#200)必须有一个有效的access_token访问此端点”, “类型”: “OAuthException”, “代码”:200 } } –
Jagadeesh
我和你的 – h4k1m
有完全相同的问题,你保存了我的一天 – Jack