title: Testing a Facebook App using localhost
body: <p>I tried to follow the instructions given in the link <a href="http://eugene17.com/2011/03/13/testing-your-facebook-app-in-your-localhost/" rel="nofollow noreferrer">http://eugene17.com/2011/03/13/testing-your-facebook-app-in-your-localhost/</a> </p>
  
  <p>I want to be able to test my facebook app locally . It however does not seem to be working . I cant figure out where i am getting it wrong . <img src="https://i.stack.imgur.com/RcRpW.png" alt="My app details are this . I have erased certain portions for security. i.e before &lt;code&gt;webapp&lt;/code&gt;"></p>
  
  <p>I have also made the following entry in my hosts file . </p>
  
  <p>127.0.0.1       localhost/   -webapp</p>
  
  <p>What wrong have i done ? i am unable to figure it out . This works fine on the live server and one of the machines . However i dont think i can change the app settings to suit my preferences . </p>
  
  <p>More details :</p>
  
  <p>Code which calls the facebook Api :</p>
  
  <p>$facebook_login_url = $facebook->getLoginUrl(array('scope' => $facebook_app_permissions, 'redirect_uri' => $redirect_uri));</p>
  
  <p>The redirect_uri uses get_url() api which resolves to localhost on my system as i am accessing the App by typing /localhost/xxxxx-webapp on my browser ..</p>
  
  <p>Now facebook does not know to connect back to locahost . Hence instead i am redirected to localhost xampp page . There is no error message in the screen nor on the console . </p>
  
  <p>I am trying to get facebook to connect back but i wonder what i am doing wrong . Can somone show me a sample entry in the hosts file ? </p>
  
  <p>The information about the app in facebook is already as shown in the screen shot . </p>