Nickolas Shaffer
Nickolas Shaffer

Reputation: 209

Invalid redirect_uri: Given URL is not allowed by the Application configuration

I keep getting the following error when trying to use my facebook integration deature on my xenforo forum.

"Invalid redirect_uri: Given URL is not allowed by the Application configuration."

My app id and secret are correct, and i added my domain, kinyo.org, to the app in facebook. Whats going on?

Upvotes: 14

Views: 49044

Answers (6)

andyrandy
andyrandy

Reputation: 74014

Did you also add your website? That´s more important than the app domain. You have to add a platform (choose "Website") and add the correct URL. The app domain is important if you have subdomains, so everything also works on those subdomains too.

Also, how is your fb.init code? https://developers.facebook.com/docs/reference/javascript/

Upvotes: 1

Ivan Chernykh
Ivan Chernykh

Reputation: 42196

For my AIR (AS3/Flex) applications to solve the issue i set the "Settings" > "Advanced" > "Embedded browser OAuth Login" to "Yes"

Upvotes: 2

Abhishek
Abhishek

Reputation: 995

For testing purpose just goto app basic setting and find Website with Facebook Login and put your localhost as below-

enter image description here

And in updating Facebook page enter image description here

Note- this is just for testing further you have to change site URL

Upvotes: 16

Partha
Partha

Reputation: 399

in the facebook App Page, goto the basic tab. find "Website with Facebook Login" Option.

you will find Site URL: input there put the full URL ( for example http://Mywebsite.com/MyLogin.aspx ). this is the URL you can use with the call like If the APP ID is 123456789

https://graph.facebook.com/oauth/authorize?client_id=123456789&redirect_uri=http://Mywebsite/MyLogin.aspx&scope=publish_actions

Upvotes: 4

Nickolas Shaffer
Nickolas Shaffer

Reputation: 209

It was fixed. I was still redirecting to my localhost/ url from local testing. I switched it to the main url and it worked fine.

Upvotes: 3

Troy Watt
Troy Watt

Reputation: 888

You will want to make sure your site url is set to the same callback url (used as the redirect_uri value passed to the graph api) within your facebook application configuration not the top level url of your site.

Facebook uses this uri as a validity check when returning a request token. If the uri that you pass to the api as a callback handler does not match the site url in your application configuration, you will receive this error.

Upvotes: 10

Related Questions