我有一个拥有HTML5视频播放器的网站。
我想在Facebook上共享链接,并且用户之一在facebook上单击该帖子的图像,它就会开始在此处播放视频。
就像youtube视频和vimeo视频一样。
我怎样才能做到这一点?
谢谢
您想找到一个好的SWF(*.SWF)视频播放器,该视频播放器可以将视频从url={video_Hot_link}(将URL参数传递给SWF播放器)
url={video_Hot_link}
URL
SWF
现在,当您准备好要播放流式视频的SWF播放器后,将Facebook Open Graph添加 到<head>标签中,如下所示:
<head>
<meta property="og:type" content="video"> <!-- site/page type more information http://ogp.me/ --> <meta property="og:video:type" content="application/x-shockwave-flash"> <!-- you need this because your player is a SWF player --> <meta property="og:video:width" content="Width in Pixels"> <!-- player width --> <meta property="og:video:height" content="Height in Pixels"> <!-- player height --> <meta property="og:video" content="http://example.com/{path_to}/{swf_player}.swf?url={video_soure}"> <!-- You will need to echo/print the video source (*.mp4) with server-side code --> <meta property="og:video:secure_url" content="https://example.com/{path_to}/{swf_player}.swf?url={video_soure}"> <!-- required for users whom use SSL (actually Facebook forces everyone to use SSL so you're required to use og:video:secure_url) so get a one -->
另外,您需要将以下前缀添加到<html>likeso
<html>
<html prefix="og: http://ogp.me/ns#">