在网站上分享html5视频到facebook

时间:2017-09-21 13:15:54

标签: html facebook video

我一直在尝试其他人如何与Facebook上的视频共享网页,并希望视频可以在Facebook墙上内嵌播放。到目前为止,在我的每次尝试中,Facebook仅在个人资料Feed中显示我的网页的元信息文本,但不显示视频。这是我的HTML代码:

<!DOCTYPE html>
<html xmlns:og="http://ogp.me/ns#">
    <head>
        <title>Ocean Vid</title>
        <meta property="og:type" content="video" />
        <meta property="og:video:type" content="video/mp4" />
        <meta property="og:video:width" content="500" />
        <meta property="og:video:height" content="500" />
        <meta property="og:video" content="https://mywebapp.com/video/oceans.mp4" />
        <meta property="og:video:secure_url"
              content="https://mywebapp.com/video/oceans.mp4" />
    </head>
<body>
</body>
</html>

我做错了什么?

1 个答案:

答案 0 :(得分:0)

我得到了它的工作。据我所知,这是让HTML5视频在Facebook上发布的最低要求

<!DOCTYPE html>
<html>
    <head>
        <title>Ocean Video</title>
        <meta property="og:image" content="http://vjs.zencdn.net/v/oceans.png" />
        <meta property="og:type" content="video" />
        <meta property="og:video:type" content="video/mp4" />
        <meta property="og:video" content="http://vjs.zencdn.net/v/oceans.mp4" />
        <meta property="og:video:secure_url" content="https://mycoolwebsite.com/video/oceans.mp4" />
    </head>
<body>
</body>
</html>

就我而言,我需要确保我同时拥有缩略图和视频的secure_url。

相关问题