issue updating facebook user status from my app - facebook

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.

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

Related

Facebook UI and API show different permissions granted, can't re-request

I have an app that lets you schedule posts to Facebook for your Facebook Pages, among other things.
For some reason late last week, the API started showing users of my app having different permissions than the Facebook UI (Settings->Apps->(my app)). The app was working fine for months, and suddenly stopped because of this permission change.
The users did not make any changes to the App's permissions, or their global security settings. Facebook still shows the correct permissions for the App for the logged in user in their App settings [1]. When logged into my site, however, the API request shows none of the extended_permissions [2]. The users have not changed their FB password. I have confirmed the app is requesting the correct user via the API.
Things I've tried:
When I force a re-request of the extended_permissions (manage_pages, publish_stream, read_insights), it is simply ignored.
When I add a new permission (manage_ads), ONLY that permission is requested in the UI.
When the user removes the app in Facebook and re-installs, only the new permission (manage_ads) is requested.
If I remove manage_ads from the request and the user removes and
re-installs, no extended_permissions are asked for.
If I make the
user a developer/admin of my App in the Developer/App settings on FB,
everything works as expected and the user is prompted for the correct permissions again. (and everything has been working for me, the admin of the app, this entire time)
I'm not sure what to do or how to proceed! Thank you in advance!
See screenshots here of the user's Facebook settings page and print_r of /me/permissions:
[1] http://i.stack.imgur.com/eS7Kw.png (Facebook UI in App Settings)
[2] http://i.stack.imgur.com/pZYYJ.png (Facebook API /me/permissions)

Adding Facebook app permissions for development purposes

I am trying to add some additional permissions to my Facebook app, namely user_likes, user_events, and user_interests to test out the functionality of each before I go into a hackathon project. However, while doing this from "Status and Review" it seems the Facebook app requires a logo, description, and privacy policy URL to even be able to request these permissions. Futhermore, the app doesn't even exist yet, so there is no such thing as a privacy policy page yet.
How can I test out some of these additional permissions just for development purposes? I tried creating a test app but this doesn't seem to have any sort of option to add permissions.
You should be able to request additional permissions during the login phase, during development and while in sandbox mode, without going through any review.
During this time you're restricted to test users and others users explicitly added to the Testers section of the Roles page for your app on developers.facebook.com.
https://developers.facebook.com/docs/facebook-login/permissions/v2.0
Only when making the app visible to all members of the public do you have to go through review.
You dont need to do anything special while your app in development mode. Just create the app and add permissions to your login code and test. That's it.!
The permissions are added in the login code using the scope parameter. Click here for more details.
For Example, if using-
JS SDK-
FB.login(function(response) {
// handle the response
}, {scope: 'manage_pages'});
Manual login flow-
https://www.facebook.com/dialog/oauth?
client_id={app-id}&
redirect_uri={redirect-uri}&
auth_type=rerequest&
scope=manage_pages
After your app is ready, send for the review with details regarding these additional permissions, privacy policy etc.

Facebook not asking for permissions

I'm developing a Facebook canvas app and I'm testing how the whole permissions thing work.
One thing is calling my attention and I think it's kind of weird: The first time, a user enters the app, Facebook sends the signed_request without the user_id and access token (as expected). Then my app redirects to the Login Dialog, so the user can authorize the app and give the asked permissions.
At this point something strange happens: Facebook is automatically redirecting the user to my app with the given permissions (and user_id and access token), but without prompting the user to give the permissions.
I have verified this behavior with test users and testers.
Is this normal? Is it possible to "force" (for testing purposes) the "ask for permissions" screen?
It is normal on a second or later use of the Facebook app.
Remove the app's permission from the Facebook account before starting the app to get back the ask for permission screen.

Is it posible to change the scope of your Facebook Connect website?

I'm building a Facebook app with Facebook login via Oauth 2.0. Will it be possible to request more permissions (scope) from the user in the future as we add features or do we need to request them all up front?
Anyone implemented this with Facebook Connect?
From my experience, you can add permissions later and it'll prompt the user to accept those permissions. For my app, I started with just basic/email permissions and then added photo... and it would prompt for the photo.
You can call Facebook's permissions api (https://graph.facebook.com/me/permissions?access_token=...) to see if the user has authorized the permission you will need (perhaps they later when in and revoked part of your apps permission but not all of it). If they did, or you just later need different permissions, just show the authorization link like you did the first time with the additional permissions listed in the url (&scope=email,read_stream...) and it will prompt them for those.

Facebook doesn't notify me after the user grants extended permissions

I am developing a Facebook App which requires some extended permission. The problem is that Facebook doesn't automatically ping my app when those permissions are granted by the user. I have to manually query for them or the user must press a confirmation button to send them to me.
My question is how can I enable Facebook to ping me automatically when permissions are changed. I am using the Facebooker plugin in Rails.
If you are developing a canvas application when a user has granted extended permissions you will begin to receive a parameter specifying which permissions were granted (fb_sig_ext_perms).
You can also use the FBJS function Facebook.showPermissionsDialog which will execute a callback that tells you which permissions the user has granted. Documentation here: http://wiki.developers.facebook.com/index.php/Facebook.showPermissionDialog
For Facebook connect, you can specify a javascript callback for when the user has granted (or chosen not to grant) permission. Documentation here: http://developers.facebook.com/docs/?u=facebook.jslib.FB.Connect.showPermissionDialog