What am I doing wrong in localhost Facebook app development?

夙愿已清 提交于 2019-11-28 08:40:38

You should use some alias domain when you want to connect your Facebook application with your local environment.

Try the following:

  1. Go to your etc/hosts (or %systemroot%/system32/drivers/etc/hosts) file and add the following line:

    127.0.0.1 foo.local # alias domain

  2. Go to App > Settings and register your application by simply using foo.local as app domain.

  3. Add your Site URL (e.g. http://foo.local/project/ )

  4. Done.

Edited on 16.01.2016:

Facebook has changed their UI, follow these steps to make it works.

  1. Go to App > Settings > Basic (tab)
  2. Click on Add Platform, select "Website" and enter your alias domain.
  3. Add your domain in App Domain section.
  4. Done.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!