API 异常(OAuthException:无法代表此用户调用 API)
使用最新的 PHP SDK 调用 api (/me) 时出现以下异常。
OAuthException:无法代表此用户调用 API。
仅某些 Facebook 帐户会出现相同的异常。有什么线索吗?
Got the following exception when calling api (/me) using the latest PHP SDK.
OAuthException: Cannot call API on behalf of this user.
The same exception appears for some facebook account only. Any clue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我找到了问题的根源(至少在我们的网站上)。在 Facebook 的开发者控制台 (https://developers.facebook.com/apps) 中,我们的应用程序显示无效的隐私政策。因此,Facebook 自动将我们的应用程序置于沙盒模式。
更新我们的隐私政策并(更值得注意的是)从沙盒模式中删除我们的应用程序导致此错误停止。
其他用户似乎在删除关于谁可以和不能的区域(特定国家)限制方面取得了一些成功登录他们的应用程序 (https://groups.google.com/forum/#!topic/django-social-auth/XaE5dFXEqhA)
此外,@Igy 的问题听起来很合理,也可能会导致找到解决方案。
祝你好运! :)
I found the source of the problem (on our site, at least). In Facebook's developer console (https://developers.facebook.com/apps), our app was showing an invalid privacy policy. Due to this, Facebook had automatically placed our app into Sandbox Mode.
Updating our privacy policy and (more notably) removing our app from Sandbox Mode caused this error to cease.
Other users seem to have had some success with removing regional (country-specific) restrictions on who can and cannot log in to their app (https://groups.google.com/forum/#!topic/django-social-auth/XaE5dFXEqhA)
Additionally, @Igy's questions sound reasonable and might lead to finding a solution as well.
Best of luck! :)
该用户的访问令牌仍然有效吗?用户屏蔽了您吗?您可以手动导航到用户的个人资料吗? (即他们的个人资料可能不可用)
Is that user's access token still valid? Has the user blocked you? Can you navigate to the user's profile manually? (i.e their profile might be unavailable)