Facebook Graph API stopped recognizing publish_action scope - php

I'm trying to upgrade an integration with the Facebook Graph API from version 1 to version 2.0, but I'm facing a problem: The permission publish_actions is not being shown in the dialog for granting.
I'm doing it manually (without the JS SDK).
PHP code:
header('Location: https://www.facebook.com/v2.0/dialog/oauth?client_id='.$appID.'&redirect_uri='.urlencode($callBackUrl).'&scope=publish_actions,offline_access');
exit(0);
Does anyone know what is happening? I've been looking for a solution for hours. As I already said, I had a working app at the Facebook from the previous version, and the Facebook API didn't show me any alert.
I assume that all configurations are correct, or at least they seem to be.

Currently, the Facebook requests reviewing your app when it uses non-basic permissions like "publish_action". If you need to use these permissions, you will need to submit your app to be reviewed by Facebook's team. Only after that the permission will be shown to your app users.
For submit your app, access your app at https://developers.facebook.com/apps/, and after clicking at your app button, click at the button "Status & Review" at the left menu, fill the form and submit it. Within 5 business days you will be notified about the reviewing result.
Another thing that has changed is that non-basic permissions are only shown to the user after he approves the basic permissions.
Furthermore it's allowed to use your own user to test the app (with all permissions, including non-basic's) before submit it.

Related

IOS HTML5 app Facebook Login failure when 'Add to Home' screen used

I have been working on a website that has a mobile version. Integrated into the site is a bit of code that allows users with FB to register without having to fill out a form. If the user meets any of the following conditions all is well
Uses ANY desktop browser
Users ANY mobile browser
The FB just works. However as soon as I do an 'Add to Homescreen' with IOS to make the app look and perform like a native app, when anyone uses the FB signup I get the
'Given URL is not permitted by the application configuration: One or more of the given URL's is not allowed by the Apps settings. It must match the Website URL or the Canvas URL, or the domain must be a subdomain of one of the App domains'
I am assuming that once you use the add to home screen, and the app gets its own instanced browser, the URL changes, likely some form of localhost derivation maybe?
I can't find any definitive answers to fixing this, and was wondering if anyone else had experienced this HTML5 IOS app problem?
Looks like the dev of the extension I was using will be working on a different authentication flow, so not giving this any more dev time

Facebook API: Adding App without authorization

I am working on first Fb App, when I visit my App , it first shows the Dialog of Goto App screen shot 1. When I click GotoApp, it already adds application in App Settings.Then it shows Permission Dialog, given here. Now even if I click Cancel then it does not remove Application at all.
COde snippet is here
I don't want to add Application Unless and Untill User ALLOW it.
I am in Sandbox Mode
Pls help it
Facebook changed the authentication dialog to include 2 steps, the first for "user and friends permissions" and the second for "extended permissions" (if asked at all). You can read all about it Auth Dialog document.
The permissions your app asks for in the 2nd step (the extended permissions) are optional and the user can choose not to grant some or all of them. There's no way to force a user to grant you all permissions, here's what you can do:
Once the user finished the authentication process check for the permissions he granted the app, you can do it with a simple graph call to: https://graph.facebook.com/me/permissions, this will get you the permissions the app has for that user.
If the user hasn't granted you with all the permissions that you must have then you have two options:
Show him a page telling him that those permissions are mandatory and that he has to accept them all if he wants to use the app
Redirect the user to the auth dialog again, in a loop, until he either accepts all permissions or just gives up and stop trying to use your app.
Just keep in mind that the more permissions you ask for (and insist on), the less users will be inclined to use your app.

facebook authentication error

I am Developing a simple Facebook Application in php which displays only name of the user of the application.
Facebook authentication dialog that appears whenever a facebook user joins an app is not appearing with the programming code I dowloaded from link https://github.com/facebook/php-sdk officially provided at facebook app developer page.
I have dowloaded some other app codes which has wrong authentication code.
I am facing 2-3 errors, in some cases the canvas page of the application is refreshing itself again and again and in the other case authentication window appears, but when one clicks on "Allow App" the page is redirected to application page that is loaded on the server and on clicking "Don't Allow" the page is redirected to canvas page instead of coming back to home page of user.
is the php-sdk library that i have downloaded is outdated or there is any other problem.
please anybody who has tested code provide the with solution coz i have tried a lot of readymade applications already (all has sane problems). i just require a working authentication code with correct php library
THe source code from the official PHP sdk site is working.... yet, it is expected that in the provided sample code, the authentication flow is not kicked off automatically. You can verify that by going through the code.
there are a few community generated tutorial listed in http://forum.developers.facebook.net/viewtopic.php?id=79787. You may find them useful.

Reauthorizing facebook application

I'm developing a facebook application and everything is going fine with log in and comments etc.
I came across the issue of 'reauthorizing' users. One of my users 'accidentally' pressed 'don't allow' when it asked them for access to their information and now they cannot sign in.
Does anyone know how I can reauthorize them?
Thanks in advance.
Edit:
It turns out that once I officially published the application the users' error disappeared. I'm pretty sure you aren't supposed to have work-in-progress published apps but that certainly solved my problem.
It should ask for permissions automatically. Try to tell him to do this:
Go to My account > Privacy settings
(I don't know the exact text of the
option because mine is in spanish).
Then, in the footer menu, select
Applications and Web sites
Next to Applications that you use,
click on Edit settings
Search your app and delete it.
Re-enter in your app and permissions dialog should appear.
As explained by manuelpedrera previously, after the user remove the application from their facebook account, he / she has to re-access your website and retry to login to your website using their facebook account. Once they choose to allow the permission, your app will again be added under their facebook account and everything should be back to normal. good luck mate :-)

Facebook Connect - Mobile

I am currently in the process of creating a mobile version of my web app.
The app is being developed with Facebook's PHP Client Library.
The issue:
I am using the following mobile url to allow users to log in using the mobile devices:
http://m.facebook.com/tos.php?api_key=APIKEY&v=1.0&next=http%3A%2F%2Ftweelay.net%2Fm.php&cancel=http%3A%2F%2Ftweelay.net%2Fm.php
APIKEY being my app's actual Facebook API key.
In the url I am telling Facebook to redirect the user back to http://tweelay.net/m.php when the user signs in or clicks cancel on the log in screen. I am pulling my hair trying to figure out why it keeps sending the user to http://m.tweelay.net/m.php which is currently an invalid end point.
I have gone through all of my app's settings on Facebook and I cant find any that reference http://m.tweelay.net and going through all of my source code I cant find any that reference the m. sub-domain either.
Any ideas? Is there a setting I'm missing? Maybe a Flag in the library?
I've seen Facebook do this when detecting the mobile browser type and also sometimes randomly through Firefox (it can also happen when trying to get to facebook.com). I've managed to reset it sometimes, but it's not a guaranteed fix.
If you want to be sure the user makes it to your correct site I suggest creating the subdomain and redirecting traffic to your usual site, it's what I did and now I don't worry about it reverting back.

Categories