PHP application does not log in to the facebook app by localhost

6

I'm developing a PHP application that returns the facebook user list of friends. Although I specified the domain and the site URL in the Facebbok app I created, I get the following message:

  

The URL you entered is not in the release list in the   Client OAuth: Redirect failed because URl used failed   is in the release list in the client's OAuth settings.   app. Make sure that the client and web OAuth login   is active and add all domains of your application as URls   valid for OAuth redirection.

I noticed that using the localhost address there was an error, so I modified the Xampp settings to change the default from localhost to testleonardo.com. I take this opportunity to ask: could I also return all the friends of my friends? Or would this be a privacy violation?

    
asked by anonymous 13.01.2016 / 16:28

2 answers

4

It's quite simple to solve this.

Open /etc/hosts (unix) or C:\WINDOWS\system32\drivers\etc\hosts .

Assuming your domain is testeleonardo.com, add this line:

127.0.0.1    local.testeleonardo.com

Then in your test, open local.testeleonardo.com in your browser that should work.

Of course you could still put the application url on your facebook application settings for testing.

    
13.01.2016 / 16:52
1

To resolve this issue, you must delete all domain information.

AndthenconfiguretheDestinationURLofLogin.

    
21.05.2016 / 19:33