Kiran Gopakumar
Kiran Gopakumar

Reputation: 82

Facebook application authorize callback URL

I am creating a facebook application which can be added to a facebook fan page as custom tab. In the application setting I can see "Deauthorize Callback" which sends a signed request with page details when a user removes application from a page to the specified URL. Is there an option to specify an authorize callback URL which receives a request with page details when user first installs the application to the page.

Please help.

Thanks in advance.

Upvotes: 2

Views: 22018

Answers (5)

John Shipp
John Shipp

Reputation: 1153

This is now located in the Facebook developer tools under "Products > Facebook Login > Settings". You'll see a section for "Valid OAuth redirect URIs"... hope that helps somebody.

Upvotes: 0

Vincent Decaux
Vincent Decaux

Reputation: 10724

You will find this in the setting of your app in Facebook.

Go to setting menu, then advanced tab, then find "OAuth setting". You will have an input called "Valid OAuth redirect URIs", you can enter several URL here.

I used it for Cordova Facebook auth, it works.

Upvotes: 1

Dave Cohen
Dave Cohen

Reputation: 1297

Once upon a time, there was an authorize callback. So, your question is perfectly reasonable.

Facebook has removed it from the app settings form. So probably it is gone for good, but I have not seen any "official" word on the matter. (i.e. zero heads up that the feature is going away.)

You'll still find the property, authorize_url, on the wildly out-of-date application properties page. But its anybody's guess whether they will continue to call that callback, if you happened to set it before it was removed from the form.

Upvotes: 2

amit_saxena
amit_saxena

Reputation: 7624

Once the user authorizes/or does not authorize your app, he is redirected to the "redirect_uri" that you specified in authentication url.

If the user presses Don't Allow, your app is not authorized. The OAuth Dialog will redirect (via HTTP 302) the user's browser to the URL you passed in the redirect_uri parameter with the following error information:

http://YOUR_URL?error_reason=user_denied& error=access_denied&error_description=The+user+denied+your+request.

If the user presses Allow, your app is authorized. The OAuth Dialog will redirect (via HTTP 302) the user's browser to the URL you passed in the redirect_uri parameter with an authorization code:

http://YOUR_URL?code=A_CODE_GENERATED_BY_SERVER

you could always check for error_reason and error parameters in the callback action to establish that the user did not authorize the app.

Complete documentation here:
http://developers.facebook.com/docs/authentication/

Upvotes: 5

Johannes Gorset
Johannes Gorset

Reputation: 8785

No, Facebook does not offer an post-authorization equivalent of the deauthorize callback.

You don't need that, though: Once a user has authorized your application, you'll find the user's credentials and access token in the signed request.

Upvotes: 2

Related Questions