From a tutorial here:
http://ankurm.com/blog/api/using-localhost-for-facebook-app-development/1091/
I tried to set up a Local development Area for my Facebook
You must create a tunnel to share your localhost; Ngrok is maby the easiest way to do that.
I develop locally and I use this URL: localhost/fb
Then I had to add a website with the following URL: http://localhost
Under App Domains I added localhost
.
Now it works. The only issue I had was, that you have to use this URL in all of your scripts. E.g.
$loginUrl = $helper->getLoginUrl('http://localhost/fb/login-callback.php', $permissions);
You can't use 127.0.0.1
here ...
My solution:
http://localhost:85/my_app/
to Valid OAuth redirect URIs
boxThis is what I used to do.
If you are using Windows, you need to modify the host file. Host file location will be at %SystemRoot%\System32\drivers\etc\
Add a new line in host file like this
127.0.0.1 localhost.YOUR-SITE-NAME.com
Save the host file.
Go to FB apps setting control panel and give localhost.YOUR-SITE-NAME.com
in Apps domain field. Save changes.
Now load you local environment like localhost.YOUR-SITE-NAME.com
from your browser.
NB: change YOUR-SITE-NAME with your domain name.