编辑:实际上是这个问题:如果用户未登录,则不支持嵌入提要中的本机视频。(因此在 webview chrome 应用程序中,它未登录)此处向 Facebook 报告了错误:https://developers .facebook.com/bugs/353742028342246/也许它是“设计使然”
老问题:
我想在 Chrome 应用程序中显示 Facebook 页面提要,它运行良好,除了原生视频不可见。
要重现,请使用 hello world 应用程序:https ://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/hello-world
添加permissions:["webview"]
manifest.json
在之后添加<h1>Hello, World!</h1>
:
<webview src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fyoutube%2F&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true" width="340" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></webview>
(使用此页面:https ://developers.facebook.com/docs/plugins/page-plugin并将“iframe”替换为“webview”)
Chrome -> Load Unpacked Extension -> 您将看到提要,但没有原生视频:
如果您使用浏览器打开 index.html(并使用<iframe>
),它将显示视频...
如果我使用<webview src="https://www.mydomain.fr/company">
正确<iframe>
的,同样的问题:除了原生视频之外的作品。
PS:Youtube 视频正在运行,您可以尝试使用 Youtube 页面:
<webview src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fyoutube%2F&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true" width="340" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></webview>