Facebook从非托管网页登录

时间:2014-02-25 12:02:36

标签: javascript android facebook fbconnect

我正在创建一个完全基于Html,CSS和Javascript的混合应用程序。

我想添加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, or the domain must be a subdomain of one of the App's domains.

同时点击登录按钮会打开一个空白窗口。

遵循本教程: https://developers.facebook.com/docs/facebook-login/login-flow-for-web/

使用Phonegap,sencha或任何其他框架。

有没有办法实现这个目标?

1 个答案:

答案 0 :(得分:0)

您需要指定一个授权域才能使用Facebook SDK,因为您的HTML只能放在手机上,而您没有域名。

enter image description here

看看Parse。 Parse是为移动应用程序中的Facebook集成而构建的框架。

https://parse.com/docs/js_guide#fbusers-signup

另一个选项是在服务器上托管HTML,CSS和JS,并通过WebView将内容提取到应用程序中,这样您就可以拥有一个可以添加到应用程序设置页面的域。

相关问题