-1

what permissions do i need for my facebook app to update status on user behalf.

I already have publish_actions and publish_streams permissions but still my app gives me an error:

error 200: the user did not grant this app the required permissions.

glautrou
  • 3,140
  • 2
  • 29
  • 34
ABC123
  • 57
  • 1
  • 1
  • 5
  • 1
    Permissions you used are correct. Post the code where you have set the permissions for your application. – Sahil Mittal Aug 26 '13 at 13:29
  • i've set permissions from facebook app settings, and facebook only takes permission for user basic info and friendlist, facebook doesnt ask user that my app may post of their behalf... – ABC123 Aug 27 '13 at 06:13

1 Answers1

0

The permissions set in the App Settings are not applied to the app. They are used for logins triggered from the App Center by the Play Game/Go to App buttons – since that is a mechanism where you as the app developer don’t trigger/implement the login yourself, you can not set a scope parameter there; and therefore you make those settings in your app dashboard, so that Facebook knows what permissions to ask for when the user enters your app this way. - Info by CBroe.

For the permissions be applied in your app, you should set the permissions through your code. The permissions are set while implementing the login functionality. For eg: In Javascript, it is done like this: FB.Login

Sahil Mittal
  • 20,697
  • 12
  • 65
  • 90
  • Thanks i did that and it works now but now the problem is, my app does not ask for permission the first time user logins... – ABC123 Aug 27 '13 at 08:07
  • Then when it asks for the permissions? PS. don't forget to accept the answer if worked! You can ask a separate question with your login code – Sahil Mittal Aug 27 '13 at 08:48
  • When i ask permissions second time it works, but when i clear browser cache cookies etc it does not work... – ABC123 Aug 27 '13 at 08:53
  • _“They are just meant to remember what permissions you have used in your app”_ – that’s not correct. They _are_ used for logins triggered from the App Center by the “Play Game”/“Go to App” buttons – since that is a mechanism where you as the app developer don’t trigger/implement the login yourself, you can not set a `scope` parameter there; and therefor you make those settings in your app dashboard, so that Facebook knows what permissions to ask for when the user enters your app this way. – CBroe Aug 27 '13 at 10:24
  • 1
    @CBroe Sorry, I'll update my answer. Thanks for the correction – Sahil Mittal Aug 27 '13 at 10:30