问题
I am doing a project and need to use the facebook API as user login. The document are clear the usage of the login button of login with facebook. However, when I test the button on localhost, it gives nothing to me, no error page, no popup windows.
I am using xampp for my local development and the site url that I fill in app setting is http://localhost:8880/atrain/
can someone help? I have searched the internet and change the hosts file but still unsuccessful.
回答1:
Set up your local server to use the standard http port (80) and use a virtual host with a TLD. It can be a fake TLD such as:
localhost.dev
How you actually accomplish this depends on what type of web-server you are using.
来源:https://stackoverflow.com/questions/9957218/use-facebook-login-in-localhost