Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
381 views
in Technique[技术] by (71.8m points)

html - Share HTML5 player on Facebook wall

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...