facebook-graph-api 获取“无效的 OAuth 访问令牌。” 3次https调用后
你好,我正在尝试获取群组墙提要,我使用桌面应用程序来获取所有提要,但在 3 个 https api 调用之后,我得到:
{"error":{"type":"OAuthException","message":"Invalid OAuth access token."}}
这是我的调用:
https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=30&offset=0
https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=60&offset=30
https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=90&offset=60
https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=120&offset=90 <-- this call gives me the error
奇怪的是,当我接受此 https 调用时,调用失败并运行它火狐,它确实返回我结果有什么想法吗?
Hi im trying to get group wall feeds , im using desktop application to get all the feeds but after 3 https api calls im getting :
{"error":{"type":"OAuthException","message":"Invalid OAuth access token."}}
this are my calls:
https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=30&offset=0
https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=60&offset=30
https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=90&offset=60
https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=120&offset=90 <-- this call gives me the error
the weird thing is that when im take this https call the one failed and run it in firefox , it does return me result any idea way ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您没有设置正确的身份验证。请参阅:http://developers.facebook.com/docs/authentication/
You do not have proper authentication set. See: http://developers.facebook.com/docs/authentication/
对于我的情况,我实际上是这样做的:
我尝试了多种方法,并且也收到了无效的 OAuth 访问令牌错误。
使用 Graph Explorer 获取页面访问令牌后,我编写了以下代码:
然后我注意到缺少等号,这修复了无效的 OAuth 访问令牌错误。
我希望它可以帮助任何遇到同样问题的人。
For my case, I actually did it this way:
I have tried several ways, and I got the invalid OAuth access token error too.
After getting my page access token using the Graph Explorer, I wrote this code:
I then noticed an equal sign was missing, and that fixed my invalid OAuth access token error.
I hope it helps anyone with the same issue.
这种情况在我身上发生了几个小时:
facebook-graph-api 获取“无效的 OAuth 访问令牌”。
就我而言,应用程序重定向到本地地址,并且 Facebook 授权的 URL 不是本地地址,因此 Facebook 无法让我登录。
我使用的用户的 access_token 是脚本中保存的一些旧 access_token window.sessionStorage。所以我以为我使用了正确的 access_token,但事实并非如此。
That happened to me for hours:
facebook-graph-api Getting “Invalid OAuth access token.”
In my case, the application was re-directing to a local address, and the URL authorized by Facebook was not local, so Facebook was not login me in.
The access_token for the user I was using was some old access_token kept in the script by window.sessionStorage. So I thought I was using the right access_token, but I was not.