Chrome app / webview中的FB.login

时间:2014-02-14 14:24:29

标签: javascript google-chrome facebook-graph-api google-chrome-app google-chrome-webview

我正在尝试将当前的网络应用打包到桌面Chrome应用中,并在window.html中使用单行webview

<webview src="http://seevl.fm" style="width:1100px; height:720px"></webview>

网络应用使用FB.login()[1]并在浏览器中运行良好,但在Chrome应用中使用时我收到以下消息

<webview>: A new window was blocked. 

我看不出我做错了什么。 FB.login()操作由用户单击触发。

是否需要任何权限?

由于

[1] https://developers.facebook.com/docs/reference/javascript/FB.login/

注意:在Chromium Apps Google群组上交叉发布

1 个答案:

答案 0 :(得分:0)

在Chrome应用中,您应该使用chrome.identity.launchWebAuthFlow()对Facebook进行身份验证(请参阅http://developer.chrome.com/apps/identity#method-launchWebAuthFlow)。

相关问题