Given URL is not permitted by the application configuration
Solution 1:
You need to fill the value for Website with Facebook Login with the value http://localhost/OfferDrive/
to allow Facebook to authenticate that the requests from JavaScript SDK are coming from right place
Solution 2:
Update to Anvesh Saxena's answer(correct but outdated as FB App interface has changed):
In your FB App configuration you need to add a Website platform with your website's URL set. Then you can add App Domains which I set to our website's base domain (e.g. for a URL like http://www.mycoolwebsite.com
, just use mycoolwebsite.com
).
IMPORTANT: In order for this to work you'll need to be using a subdomain of your app's URL for your local development. You can do this easily by modifying your hosts file on your development computer to use a non-existent subdomain of your website such as local.mycoolwebsite.com
. Just google 'edit hosts file' for your platform (e.g. mac / windows) if you're not familiar with how to do this.