Changing Facebook Oauth redirect url

In our Java EE application, we call the fb oauth thread to get the accessToken. To do this, we make a callback call to the fb server with the application key and secret.

At this point, the same url is provided in the url section of the fb app.

However, is it possible if we can somehow change the redirect url to another server? I've seen that only changing the callback url in the code doesn't work. It looks like it should be the same in both code and fb application.

It is very difficult to test or use the same application to try things from two different web servers.

Any advice on this?

+3


source to share


3 answers


This is unfortunately not possible. Just redirect the user to your redirect_uri which will redirect you to the correct location.

The URL to redirect after the user clicks a button in the dialog. The URL specified must be a URL with the same base domain as specified in your app settings, the form canvas URL https://apps.facebook.com/YOUR_APP_NAMESPACE, or the form page page URL https: //www.facebook. com / PAGE_USERNAME / app_YOUR_APP_ID



https://developers.facebook.com/docs/reference/dialogs/oauth/

+1


source


For security reasons, you cannot change the redirect url. Facebook verifies that you provide the same redirect URL that you provided when registering the app. The way I solved it was to register one facebook app for each server.



0


source


Here is a solution from the Promo group

One of the options is to add a second domain (address mirror of the main site) to
Settings » Basic tab at the top» Mobile Site URL

-1


source







All Articles