I have just followed the excellent guide here : https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.0 on how to enable facebook login for a website using the Javascript SDK.
I have tried it - and when I click my nice log in button I get the error:
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 note the URL for this error :
https://www.facebook.com/v2.0/dialog/oauth?scope=public_profile%2Cemail&response_type=none&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Freturn%2Farbiter%3Frelation%3Dopener%26close%3Dtrue%23origin%3Dhttp%253A%252F%252Flocalhost%253A56378%252Ff1c45491ec&seen_revocable_perms_nux=false&ref=LoginButton&auth_type=&default_audience&state=fdcac98d4&app_id=251165285007053&client_id=251165285007053&display=popup
So I go to my facebook app and add in my no-ip hostname, and 'localhost' - it doesnt like localhost so I remove it.
However I still get the message as the request is still being sent from domain localhost.
Is there a way I can test this running locally? I do not have a domain to deploy to during development.
In your app configuration, you should set your website URL to http://localhost/
If you're using a specific localhost port, you MUST include that (e.g. http://localhost:64321/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With