I´ve written a facebook connector app which should request some permissions.
When I click the preview login dialog button in the applications edit menu all the permissions are listed but when I open the login dialog from my website only the standard permissions (general user information) are requested. I´ve already saved it several times and waited for hours but it doesn´t work.
Am I doing anything wrong or did I just discover a bug or something?
Thanks.
The permission settings in your Facebook application configuration only apply to auth dialogs from the Facebook app center. You need to specify the permissions you want when you are opening the login dialog from your website. For example, if you're using the Javascript SDK's FB.login to do login, you will need something like
FB.login(function(response) {
// handle the response
}, {scope: 'email,publish_actions'})
Pay particular attention to the scope parameter.
Related
I have created an app. It does not prompt users to Post on Wall permission, after the GO to App popup. I have given the following settings for my app in developer account.
User & Friend Permissions: email,user_activities,user_likes,publish_actions
Extended Permissions: publish_stream,read_stream,offline_access
When i click a "Preview Login Dialog" link, it shown the following rights in "GO to App" popup.
THIS APP WILL RECEIVE:
Your basic info
Your email address
Your activities
Your likes
But, when i access the app at the first time, it shown the following rights alone.
THIS APP WILL RECEIVE:
Your basic info
Due to this, i could not post on well. I have checked.
Similarly, i have checked user's app setting page.
User account has no option like the below.
* Post on your behalf
* Access posts in your news feeds
What is wrong? I spent more than 3 hours to find out.
Be sure that you have expected permissions set in the scope parameter of method invoking the login dialog:
FB.login(function(response) {
// handle the response
}, {scope: 'email,user_activities,user_likes,publish_actions,etc...'});
And just in case, to be sure that you will have needed permissions before doing something that needs them, try handling revoked premissions, as I pointed here.
BTW, be sure to request only permissions your app really needs. You can scare users with so many permissions. ;)
Basically I want to check the extended permissions the user has granted my app.
If any one permission that I want is not given by the user, Then I want the user to be redirected to facebook permission Dialog(Not the oauth dialog which comes first).
Is it possible to do that using php or js sdk(php preferred).
Then I want the user to be redirected to facebook permission Dialog(Not the oauth dialog which comes first).
First of all, there’s a misunderstanding on your side here: That is only one dialog, it’s only split into two pages where appropriate.
So when asking for (more) extended permissions, you just call the OAuth dialog the normal way (getLoginURL in PHP SDK, FB.login from the JS SDK) – if the user has already authorized your app and only new extended permissions are required, then only the second page of the dialog is shown automatically.
I have a facebook iframe app, and I have just noticed that a basic permission dialog is fired for every new visitor. This dialog is launched by Facebook, not by my application (index.php hasn't been called yet).
This behavior is new, and not wanted : users are allowed to visit some pages of the app and later are asked for extended permissions.
At first I though it was the new open graph feature, but removing it didn't help. I don't use the new Enhanced Auth Dialog either. I tried turning social discovery on and off also.
Does anyone else has experienced this behavior ?
Thanks!
Check you haven't enabled Authenticated Referrals in your app settings
I am having a problem with facebook authentication in facebook Page Tab. I am usin JavaScript SDK FB.login method. I need theese scope: 'email,publish_stream'} permissions. And then I am launching my authentication function I am getting two popups one which asks to login and gives email permition and other requires to allow to post on whall. My question is how to login with only one permission asking?
I found the answer to my question!
Go to https://developers.facebook.com/apps
Click on your app.
Click edit app
Click Advanced
Check Enhanced Auth Dialog: Disabled
Thats it. You have one authentication popup.
Take a look at this page http://developers.facebook.com/docs/reference/api/permissions/
Here they specify two types of permissions. Basic permissions and extended permissions. publish_stream falls in the second category and that is why you are getting two pages.
This is a new thing they have made to make sure users understand what they are giving access to.
"You can ask for the following extended permissions in the scope parameter of the Auth Dialog.
If you are using the Enhanced Auth Dialog, these permissions are revocable, and are presented on the second page of the Dialog."
This is because of the Enhanced Auth Dialog.
I've created an app that works fine, however if the user has not authorized my app yet, they have to do the following (assuming they are in facebook AND logged in) -
go to my app
click login/authorize
popup with facebook permissions opens
accept in the popup
However I noticed with Zynga games like Mafia Wars 1/2, Farmville etc, when you go to the app, if it hasn't been authorized, it takes you straight to the permissions which is in a PAGE and not a popup, thereby eliminating one step. Also, the permissions dialog is full width, there is not app sidebar.
Does anyone know how I can duplicate this flow? It would be much easier to have users authorize within a facebook page rather than through a popup. How can I get permissions inside the page?
thanks in advance
Once user visit a Page tab with your application you can check if he is connected with your application by comparing Page ID with User ID in signed_requests, for unauthorized users ID's will be same. In that case you can start authentication flow by redirecting user's browser to "login url".
If you want it to be full page just do the redirect with JavaScript like this:
window.top.location = 'https://www.facebook.com/dialog/oauth?
client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=COMA_SEPARATED_PERMISSIONS'
If you using PHP you can construct Login URL by calling Facebook->getLoginUrl method.
Read the docs on Facebook authentication