facebook嵌入Feed中的视频未显示在Chrome应用中

时间:2016-12-31 02:47:05

标签: html5 google-chrome facebook-javascript-sdk google-chrome-app google-chrome-webview

编辑:实际上问题是这个问题:如果用户没有登录,则不支持嵌入Feed中的原生视频。(因此在webview chrome应用中,它未登录)此处向Facebook报告错误:{{ 3}}也许它是“按设计”

老问题:

我想在Chrome应用中显示Facebook页面Feed,除了原生视频不可见外,它的效果非常好。

要重现,请使用hello world app:https://developers.facebook.com/bugs/353742028342246/

在manifest.json

中添加permissions:["webview"]

<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://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/hello-world并将'iframe'替换为'webview')

Chrome - &gt;加载未打包的扩展 - &gt;您将看到Feed但没有原生视频:

https://developers.facebook.com/docs/plugins/page-plugin

如果您使用浏览器打开index.html(并使用<iframe>),则会显示视频...

enter image description here

如果我使用<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>

enter image description here

2 个答案:

答案 0 :(得分:0)

我向Facebook报告了这个错误,也许它是“按设计”

https://developers.facebook.com/bugs/353742028342246/

等待“团队”的回应。

答案 1 :(得分:-1)

首先复制所需的Facebook视频的网址。

然后转到此页面: https://developers.facebook.com/docs/plugins/embedded-video-player#configurator

将网址粘贴到&#34;视频的网址&#34;,然后点击位于底部的获取代码。

您可以复制放置在href标签中的网址(位于第3步)并将其粘贴到您的编辑器中。

相关问题