从本地主机域测试facebook javascript登录
我刚刚遵循了这里的优秀指南:关于如何使用Javascript SDK为网站启用facebook登录 我已经试过了-当我点击我的登录按钮时,我得到了错误:从本地主机域测试facebook javascript登录,javascript,facebook,facebook-graph-api,facebook-javascript-sdk,Javascript,Facebook,Facebook Graph Api,Facebook Javascript Sdk,我刚刚遵循了这里的优秀指南:关于如何使用Javascript SDK为网站启用facebook登录 我已经试过了-当我点击我的登录按钮时,我得到了错误: Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL,
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
我注意到此错误的URL:
https://www.facebook.com/v2.0/dialog/oauth?scope=public_profile%2Cemail&response_type=none&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Freturn%2Farbiter%3Frelation%3Dopener%26close%3Dtrue%23origin%3Dhttp%253A%252F%252Flocalhost%253A56378%252Ff1c45491ec&seen_revocable_perms_nux=false&ref=LoginButton&auth_type=&default_audience&state=fdcac98d4&app_id=251165285007053&client_id=251165285007053&display=popup
所以我转到我的facebook应用程序,添加我的无ip主机名和“localhost”——它不喜欢localhost,所以我删除了它
但是,我仍然收到消息,因为请求仍然是从域localhost发送的
是否有一种方法可以在本地运行此测试?在开发过程中,我没有要部署到的域。在应用程序配置中,您应该将网站URL设置为
http://localhost/
如果您使用的是特定的本地主机端口,则必须包括该端口(例如
http://localhost:64321/
在这里找到了答案:你找到答案了吗。。。??