This URL is not allowed by application configuration. when using the Javascript SDK for Facebook

I am currently using the Javascript SDK for Facebook, and I continue to encounter the following problem that appears on the console:

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

I read the truck loading related posts, but still can't get it to work. I work locally using the following: http://localhost:8080/bookbayapp/ . In the facebook developer apps section, I have the following:

enter image description here

But again, nothing works. I am currently using Google Chrome for testing, and it is worth mentioning that I am using the Facebook plugin for Phonegap, but when testing I will comment on the link to the js plugin, so I assume that there should be no problem?

+1
source share
1 answer

What works for me is to use the actual URL of the production server, and then add a line to the hosts file, which redirects all traffic from this URL to localhost.

Say your site is called potatoes.com. In the "Site URL" write:

 http://potatoes.com/bookbayapp 

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

 potatoes.com 127.0.0.1 
0
source

Source: https://habr.com/ru/post/954909/


All Articles