36

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.

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Hassane Nassiri
  • 381
  • 1
  • 3
  • 5
  • 2
    Can you edit your question to include the relevant parts of your code? Also, please format the error message as a quote (by putting it on a new line starting with `>`) so that it's clear what is question and what is exception. Having it emboldened makes it **harder to read**. – Wai Ha Lee May 06 '15 at 11:09

3 Answers3

72

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

Tobi
  • 31,405
  • 8
  • 58
  • 90
11

Just use publish_actions instead of publish_stream.

lukyer
  • 7,595
  • 3
  • 37
  • 31
  • Please tell me how to replace it and where? I really do not find any solution yet... I am unable to login into facebook from my app – NikW May 25 '15 at 09:43
  • @NikW in your Facebook Login API call - it depends on language. For example in JavaScript: `FB.login(function(response) { // handle the response }, { scope: 'publish_actions', return_scopes: true });` – lukyer May 26 '15 at 11:39
  • i m asking for user_friends and user_gender which is listed in FB permissions but getting same error. Can you please suggest it? – Chandni Jun 29 '18 at 06:33
0

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" />
Lucky
  • 16,787
  • 19
  • 117
  • 151