I have set up facebook authentication for my site.
When I click on “sign-in with facebook” it throws me to the following url:
https://graph.facebook.com/oauth/authorize?redirect_uri=http%3A%2F%2Fexample.com%2Fla_facebook%2Fcallback&display=page&client_id=126197457491070
The redirect_url is “example.com”, which is obviously not correct or allowed.
However, nowhere in my code or in the authentication package I’m using is example.com set, so this must be generated by facebook? Where can I change it? Why is it not the same as the domain and website I’ve set in the facebook app settings?
I get the following error because of that redirect_url:
{
"error": {
"message": "Invalid redirect_uri: Given URL is not permitted by
the application configuration.",
"type": "OAuthException"
}
}
I’m using Django with Heroku and django-la-facebook (https://
github.com/cartwheelweb/django-la-facebook)
If you look at the code of the django app you are using for authenticating through facebook, you’ll see something like this:
as burhan pointed, the default contrib.sites domain is being used as the base for the redirect uri, so you should fix it to be your actual domain.