FB API调用时,无法代表此用户调用API

编程入门 行业动态 更新时间:2024-10-25 01:29:48
本文介绍了FB API调用时,无法代表此用户调用API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在facebook API通话中遇到问题。我正在使用Koala进行服务器端api通话,但最近进入api通话的问题。所以我试图绕过考拉电话,并使用call进行原始的api http呼叫,但无效。

当我从开发机器卷曲时,它的工作正常。

curlgraph.facebook/me?oauth_token=my_token

它返回配置文件的详细信息,但是从生产机器完成的同样的事情,它抛出异常

{error {message:无法代表此用户调用API,type:OAuthException,code:200}}

解决方案

我发现问题的根源(至少在我们的网站上)。在Facebook的开发者控制台( developers.facebook/apps),我们的应用程序显示无效的隐私权政策,因此,Facebook自动将我们的应用程序置于沙箱模式。

更新我们的隐私政策和(更重要的是)从Sandbox模式中删除我们的应用程序,导致此错误停止。

其他用户似乎取得了一些成功, ()可以登录到他们的应用程序groups.google/forum/#!topic/django-social-auth/XaE5dFXEqhA )

祝你好运! :)

I am having trouble with facebook API call. I am using Koala for server side api call but recently came into issue making api call. So I tried to bypass koala call and did raw api http call using call but to no avail.

When I do curl from development machine it works fine.

curl "graph.facebook/me?oauth_token=my_token

It returns profile details, but the same thing done from production machine, it's throwing the exception

{"error":{"message":"Cannot call API on behalf of this user","type":"OAuthException","code":200}}

Does anyone had the same issue? Like to hear from you guys.

解决方案

I found the source of the problem (on our site, at least). In Facebook's developer console (developers.facebook/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 (groups.google/forum/#!topic/django-social-auth/XaE5dFXEqhA)

Best of luck! :)

更多推荐

FB API调用时,无法代表此用户调用API

本文发布于:2023-10-17 10:46:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1500674.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:代表   用户   FB   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!