Given URL is not allowed by the Application configuration

扶醉桌前 提交于 2019-11-28 09:53:11

Enter http://localhost/Users/home/Documents/facebook/ as your "Site Domain" on the developer app:

https://developers.facebook.com/apps/{api_key}/summary

Replace {api_key} with yours; or find a link at https://developers.facebook.com

Interestingly enough, Facebook lets you type anything into the domain so it can be an offline URL (such as localhost or a local port) and Facebook will redirect to it after authentication.

You can test Facebook applications locally if you add an entry to your hosts file which points to any subdomain of the root domain you gave Facebook. For example, if your domain is example.com, you can add entry to your hosts file pointing fbtest.example.com to localhost (127.0.0.1).

You can then test away locally without having to edit your Facebook app configuration (assuming your local server is set to serve the same content to all subdomains).

Alternatively, if it's important to have the exact domain, you can just add an entry for the root domain. It just means you won't be able to access the live site while testing.

In order to develop and publish a Facebook application, you must provide a web accessible URL that Facebook can query. If you have webspace you can upload to or make your IP available to the web for Facebook to call, it should solve your problems.

Facebook will allow you to put just about any valid url into the box, however when you go to use it for logins or general use, you will begin to notice errors, since Facebook's spider cannot fetch the url.

Check the 'Desktop Apps' section of https://developers.facebook.com/docs/authentication/ This explains how to do authentication where there's no server involved, it's aimed at desktop apps but a browser toolbar should work in a similar way

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!