Testing a Facebook application using localhost

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. My app details are this. I have erased certain portions for security. i.e before <code> webapp </code>

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.

+4
source share
1 answer

this is what worked for me. I hope someone stumbles upon him when they get lost.

http://thinkdiff.net/facebook/how-to-develop-test-facebook-connect-application-locally/

+3
source

Source: https://habr.com/ru/post/1437120/


All Articles