Facebook OAuth redirect_uri problem 'Given URL is not permitted by the application configuration.'

StackOverflow https://stackoverflow.com/questions/3707738

  •  02-10-2019
  •  | 
  •  

Question

When asking for authorisation by redirecting to the following url:

https://graph.facebook.com/oauth/authorize?client_id=...&scope=email,offline_access&redirect_uri=http%3A%2F%2Flocalhost%2Flogin%2Findex.php%3Fcallback%3Dfacebook

Facebook returns 'Invalid redirect_uri Given URL is not permitted by the application configuration.'

Possibly because my application is registered with http://syncacity.com on the application configuration. But still, twitter allows me to redirect to any url, so why is facebook whining?

I'd appreciate your thoughts :)

Was it helpful?

Solution

why not just edit your hosts file and point your domain to your local ip then you only need to switch the dev box hosts before doing anything.

OTHER TIPS

Change your application url to http://localhost while you develop and then to your site once it's in production. :)

it got resolved - thanks to one of the Facebook platform developers.

Let's say your local site URL is http://localhost:8000 You will need to add http://localhost:8000 to the Facebook App setting at "Settings -> Basic -> Website->Site URL."

Following worked for me:

App Domains: localhost
Site URL: http://localhost

enter image description here

I create a test app in sandbox mode (advanced settings) then integrate to that for development and test

You have defined localhost url in redirect_url (redirect_uri=http://localhost/login/index.php ..) I'm not familiar with OAuth but that might be the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top