Error Invalid Scopes: offline_access, publish_stream, when I try to connect with Facebook API

╄→гoц情女王★ 提交于 2019-11-26 14:04:17

问题


I got this error when I try to connect with Facebook API

Invalid Scopes: offline_access, publish_stream. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/Facebook-login/permissions

Before I can connect my website with my Facebook account without problem and today I got the error above, the app is in my Facebook account when I use other Facebook account users of my app I can connect to my website without problem.


回答1:


The permissions offline_access and publish_stream are deprecated, thus cannot be requested anymore.

publish_stream can be replaced by publish_actions, offline_access is gone.

See

  • https://developers.facebook.com/docs/facebook-login/permissions/v2.4#reference
  • https://developers.facebook.com/docs/apps/changelog



回答2:


Just use publish_actions instead of publish_stream.




回答3:


In the below form you can see the value having the publish_stream and offline_access parameters which is deprecated as said above by Tobi.

<form th:action="@{/signin/facebook}" method="POST">
        <button type="submit">Sign in with Facebook</button>
        <input type="hidden" name="scope" value="email,publish_stream,offline_access" />
</form>

so remove those two parameters and change the to,

<input type="hidden" name="scope" value="email,publish_actions" />


来源:https://stackoverflow.com/questions/30074899/error-invalid-scopes-offline-access-publish-stream-when-i-try-to-connect-with

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