Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to embed my own flash video player in Facebook?

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?

like image 746
Matthias Avatar asked Oct 14 '14 18:10

Matthias


Video Answer


1 Answers


You want your SWF file in a Facebook post like this: Example?

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

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) Put the meta tags somewhere within the < head > .... < / head > section of your page's HTML.

(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) Currently the maximum Width is 504 and Height is 283. Check this page for updates whenever Facebook changes its mind about those settings.

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.

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

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).

I cant confirm this now but.. Don't be surprised if the HTML5 video file is played by a system player (in a pop-up window?) and not with your own custom-design JS/CSS interface.

<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" />

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" />
like image 134
VC.One Avatar answered Oct 19 '22 05:10

VC.One