I tried to follow the instructions given in the link http://eugene17.com/2011/03/13/testing-your-facebook-app-in-your-localhost/
I want to check the local facebook application. However, it does not seem to work. I canβt understand where I am going wrong. 
I also made the following entry in my hosts file.
127.0.0.1 localhost / -webapp
How was I wrong? I canβt figure it out. This works fine on a real server and one of the machines. However, I do not think that I can change the application settings according to my preferences.
More details:
Code that calls facebook api:
$ facebook_login_url = $ facebook-> getLoginUrl (array ('scope' => $ facebook_app_permissions, 'redirect_uri' => $ redirect_uri));
Redirect_uri uses the get_url () api, which allows localhost on my system, since I access the application by typing / localhost / xxxxx -webapp in my browser.
Now facebook does not know how to connect to locahost. Therefore, instead, I was redirected to the localhost xampp page. An error message does not appear on the screen and on the console.
I'm trying to get facebook to connect, but I'm wondering what I'm doing wrong. Can someone show me a sample entry in the hosts file?
Facebook app information is already shown in the screenshot.
source share