Share HTML5 player on Facebook wall

只愿长相守 提交于 2019-12-17 18:27:30

问题


I have a player both in Flash as well the same in HTML5 version. I am calling a page through iframe which detects the browser and device and loads the player accordingly and it is working fine.

Before the HTML5 version of the player I was able to share the Flash player to Facebook. But how do we make it workable with HTML5 player? If I share the iframe page it doesn't work nor the video doesn't play.

I find that youtube is able to do the same what we require, please advice and help how to accomplish the requirements.


回答1:


Check the section corresponding to audio and video data on the open graph documentation page.

You will need to add the following open graph tags to the resource page as given in the documentation.

<html xmlns:og="http://ogp.me/ns#"> 
    <head>
        ...
        [REQUIRED TAGS]
        <meta property="og:video" content="http://example.com/awesome.swf" />
        <meta property="og:video:height" content="640" />
        <meta property="og:video:width" content="385" />
        <meta property="og:video:type" content="application/x-shockwave-flash" />
        <meta property="og:video:secure_url" 
              content="https://secure.example.com/awesome.swf" />
        <meta property="og:video" content="http://example.com/html5.mp4" />
        <meta property="og:video:type" content="video/mp4" />
        <meta property="og:video" content="http://example.com/fallback.vid" />
        <meta property="og:video:type" content="text/html" />
        ...
    </head>


来源:https://stackoverflow.com/questions/8708233/share-html5-player-on-facebook-wall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!