'Cannot call API on behalf of this user' on FB API call

。_饼干妹妹 提交于 2020-01-05 01:40:43

问题


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 "https://graph.facebook.com/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.


回答1:


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)

Best of luck! :)



来源:https://stackoverflow.com/questions/16334451/cannot-call-api-on-behalf-of-this-user-on-fb-api-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!