如何在 Facebook 中嵌入我自己的 Flash 视频播放器? [英] How to embed my own flash video player in Facebook?

查看:34
本文介绍了如何在 Facebook 中嵌入我自己的 Flash 视频播放器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 facebook 上嵌入我的 Flash 视频播放器,这样当人们在 facebook 上分享我的视频时,它会让他们在 Facebook 上播放视频.我在 stackoverflow 上看到了一些关于此主题的帖子,并且不再需要白名单,但在 2013 年 12 月之后我找不到任何关于它的信息.

I want to embed my flash video player on facebook so that when people share my videos on facebook, it will let them play the video on Facebook. I saw some posts here on stackoverflow about this topic and that a whitelisting wouldn't be required anymore, but i can't find any informations about it beyond December 2013.

还有可能吗?如果是,是否需要列入白名单?

Is it still possible? If yes, does it require a whitelisting?

推荐答案


您希望在 Facebook 帖子中使用您的 SWF 文件,如下所示:示例?

注意:Facebook 将仅显示从 HTTPS 服务器托管的 SWF 文件.如果你能做到那部分,请继续阅读..

note: Facebook will only display SWF files that are hosted from an HTTPS server. If you can do that part then read on..

1) 您需要在您的网站上有一个 HTML 页面,然后在您的 Facebook 状态中发布为链接.Facebook 将从包含在该链接页面中的 meta 标记读取和加载 SWF 数据.

1) You need to have an HTML page on your site that is then posted as a link on your Facebook status. It's from the meta tags contained in that linked page that Facebook will read and load the SWF data.

2) 将元标记放在 < 中的某个位置.头 > .... </head > 页面 HTML 部分.

2) Put the meta tags somewhere within the < head > .... < / head > section of your page's HTML.

(注意:为了使上面的示例工作,我当时使用了旧样式的嵌入,但您可以尝试使用较新的 OG 标签.很好的参考).以下是您自己的 html 示例(SWF 位于 "video_src" 中)

(note: To make the above example work I had used old style embedding back then but you can try the newer OG tags. Good Reference). Below is an example for your own html (SWF goes in "video_src")

< head >
<meta name="title" content="My Video SWF inside FBook" />
<meta name="description" content="Just a test for embedding SWF in a status" />
<meta name="medium" content="video" />

<link rel="image_src" href="https://website.com/files/test_Thumbnail.jpg"/> 
<link rel="video_src" href="https://website.com/files/test_VideoPlayer.swf"/>

<meta name="video_width" content="504" />
<meta name="video_height" content="283" />
<meta name="video_type" content="application/x-shockwave-flash"/>
< /head >

3) 目前最大宽度为 504,高度为 283.检查 此页面,用于在 Facebook 对这些设置改变主意时的更新.

3) Currently the maximum Width is 504 and Height is 283. Check this page for updates whenever Facebook changes its mind about those settings.

您可以使用他们的调试器检查 Facebook 如何解析"您的 html 链接 工具.只需像粘贴墙贴一样粘贴您的 html 页面链接,它就会显示实时预览.

You can check how Facebook will "parse" your html link using their Debugger Tool. Just paste your html page link as you would in a wall post and it will show a live preview.

更新:对于 HTML5 视频(注意:我自己还没有尝试过这部分,但只是我的理解..)

UPDATE: For HTML5 Video (note: I havent tried this part myself but just my understanding..)

假设您已经使用了 OG: 标签,那么您可以放置​​多个 OG:Video 链接(第一个应该是 Flash,然后回退到 HTML5,这应该是视频文件的直接链接).

Assuming you've gone with OG: tags then you can just put multiple OG:Video links (first one should be Flash followed by fallback to HTML5 which should be the direct link to video file).

我现在无法确认,但是.. 如果 HTML5 视频文件是由系统播放器(在弹出窗口中?)而不是使用您自己的自定义设计 JS/CSS 播放,请不要感到惊讶界面.

<meta property="og:video" content="https://website.com/files/test_VideoPlayer.swf" />
<meta property="og:video:secure_url" content="https://server.com/files/test_VideoPlayer.swf" />
<meta property="og:video:type" content="application/x-shockwave-flash" />

其次是...(对于非 Flash)

followed by... (for non-Flash)

<meta property="og:video" content="http://website.com/files/Video.mp4" />
<meta property="og:video:secure_url" content="https://server.com/files/Video.mp4" /> 
<meta property="og:video:type"       content="video/mp4" /> 
<meta property="og:video:width"      content="500" /> 
<meta property="og:video:height"     content="280" />

这篇关于如何在 Facebook 中嵌入我自己的 Flash 视频播放器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆