1

Im currently using the Facebook Javascript SDK and I keep running into the following problem that appears in the console:

Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings.  It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

I've read a truck load of related posts but still can't get it to work. I am working locally using the following: http://localhost:8080/bookbayapp/. In my facebook developers app section I have the following:

enter image description here

But once again nothing seems to work. I am currently using Google Chrome for the testing and it is worth to mention that I am using the Facebook Plugin for Phonegap but when testing I comment out the link the to plugin js so I assume in doing this there shouldn't be any problems?

user481610
  • 3,230
  • 4
  • 54
  • 101

1 Answers1

0

What works for me is using the actual URL of the production server, and then adding a line to the hosts file that redirects all traffic from that URL to localhost.

Let's say your website is called potatoes.com. In "Site URL" write:

http://potatoes.com/bookbayapp

and then open your hosts file (C:\Windows\System32\drivers\etc\hosts) and add the following line:

potatoes.com 127.0.0.1
isherwood
  • 58,414
  • 16
  • 114
  • 157
Ilya Kogan
  • 21,995
  • 15
  • 85
  • 141