14

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?

pad
  • 41,040
  • 7
  • 92
  • 166
Nickolas Shaffer
  • 209
  • 1
  • 3
  • 11

6 Answers6

16

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

Abhishek
  • 995
  • 13
  • 28
10

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.

Troy Watt
  • 868
  • 8
  • 16
  • i cant find callback url option on the page – chaitanya Mar 07 '13 at 07:51
  • 2
    @chaitanyasaraf - Go to facebook developer and in your app, go to settings->Basic, there you should be able to see "Website with Facebook Login", you need to put your callback url there – iCyborg Jun 02 '13 at 12:26
  • I had a mixup between localhost and 127.0.0.1. Changing the two to be consistent solved the issue for me. – sffc Jun 16 '13 at 10:09
4

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

Partha
  • 389
  • 2
  • 7
3

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.

Nickolas Shaffer
  • 209
  • 1
  • 3
  • 11
2

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

Ivan Chernykh
  • 41,617
  • 13
  • 134
  • 146
1

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/

andyrandy
  • 72,880
  • 8
  • 113
  • 130