Given URL is not allowed by the Application configuration. when using the Facebook Javascript SDK


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:

<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/asjg4.png" data-original="https://i.stack.imgur.com/asjg4.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

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?


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:


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



  • Combine pairs to groups [PHP / Arrays]
  • LINQ doesn't end with certain characters
  • Enable Case Sensitive when using DataTable.select
  • Is it possible to have a wildcard in the middle of a sub/sub-subdomain etc?
  • RewriteCond and RewriteRule in .htaccess
  • Rails routing for has_and_belongs_to_many relationship
  • Different SSL-certificates for different parts of site
  • .htaccess rewrite: subdomain as GET parameter and filepath afterdomain intact
  • Do custom action after devise model confirmation
  • Moving data between processes in Spartan 3
  • Google Places API - Get more than 10 photos from Details Response?
  • Android Oreo JobIntentService Keep running in background for Android 7 &below and crashing often
  • Dispose not working as expected in DirectorySearcher
  • Fluid video height
  • Weird LEFT OUTER JOIN on Includes eager loading of rails 3
  • Connecting Google Cloud SQL with Wordpress on Google Compute Engine
  • How to make SASS put relative paths in its output
  • Save website uploads in a subdomain
  • jwtBearer bearer token with rc-1 update to ASP.Net 5
  • Xstream to map “choice” elements of XML
  • Why cepheus don't send int without quotes to orion?
  • C# program and C++ DLL compiled for 32-bit system crash on 64-bit system
  • Loading .coffee files via a view in Rails
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • Should I or shouldn't I use the CachingConnectionFactory with hornetq 2.4.1
  • Create DicomImage from scratch using Dcmtk
  • Webgrid not refreshing after delete MVC
  • Email verification using google app script and google forms
  • Do create extension work in single-user mode in postgres?
  • R: gsub and capture
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • Comma separated Values
  • InvalidAuthenticityToken between subdomains when logging in with Rails app
  • SQL merge duplicate rows and join values that are different
  • How do you join a server to an Active Directory (domain)?
  • how does django model after text[] in postgresql [duplicate]
  • Cant find why the layout is getting smaller
  • LevelDB C iterator
  • Can't mass-assign protected attributes when import data from csv file
  • How to load view controller without button in storyboard?