embedding content on facebook page - facebook

When I share YouTube video link on Facebook, facebook renders video in page.
Is that because YouTube supports something like oembed or facebook is doing something very custom for YouTube or combination of both?

Facebook will allow you to embed video as long as it is in SWF format, like youtube embeds. Use these open graph tags on your page:
<meta property="og:video" content="http://example.com/awesome.swf" />
<!-- these 3 are optional -->
<meta property="og:video:height" content="640" />
<meta property="og:video:width" content="385" />
<meta property="og:video:type" content="application/x-shockwave-flash" />

Related

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

Sharing App on Facebook + Video

I am launching an app today, and would like to share it on Facebook. I also have a video I have made to go along with it to use as promo. Is it possible to have a video embedded in the post, that then links to the app store link? I assume this is using meta, I have tried using:
og:title,og:site_name,al:ios:app_name,og:video:url,al:ios:app_store_id
Take a look at the Open Graph specification for the correct OG tags: http://ogp.me/#type_video
There is also an example if you scroll up:
<meta property="og:video" content="http://example.com/movie.swf" />
<meta property="og:video:secure_url" content="https://secure.example.com/movie.swf" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="400" />
<meta property="og:video:height" content="300" />

Facebook doesn't detect video while sharing my own page

I have a website with many video pages. There is only one video on each page.
When i share a link of one of these pages on facebook, it is not considered as a video, but only a standard article.
Thumbnail, Title and Decription are well displayed. But instead of displaying the thumbnail, i would like Facebook to display the video.
I'm using videoJS as video player.
Here is my html header:
<meta property="og:title" content="Page Title" />
<meta property="og:description" content="Page Description" />
<meta property="fb:admins" content="ADMIN-ID" />
<meta property="fb:app_id" content="APP-ID" />
<meta property="og:image" content="/path/to/the/thumbnail.jpg" />
<meta property="og:type" content="video" />
<meta property="og:url" content="www.domain.com/video.html" />
<meta property="og:video" content="www.domain.com/video.mp4" />
<meta property="og:video:type" content="video/mp4" />
And my video :
<video id="video_1" class="video-js vjs-default-skin shadow" controls preload="auto" width="686" height="386" poster="path/to/the/poster.png">
<source src="path/to/the/video.mp4" type='video/mp4' />
</video>
Here are the Facebook Debug Tool informations :
{
"url": "http:\/\/www.domaine.com\/video.mp4",
"type": "video\/mp4",
"width": 686,
"height": 386
}
and
status :
Video embedding on Facebook enabled
Thanks for your help and your comprehension, i'am a newbe in Facebook API.
Do you have HTTPS URLs for your video files in the OG meta tags as well?
You will need HTTPS sources as well, since most Facebook users surf over HTTPS already (and Facebook is in the process of getting the rest of them there).

Open Graph Protocol - og:movie with youtube link

Wanted scenario:
people link to my website via Facebook
open graph data pops up (name, description, thumbnail, ...) (which works)
when you click the thumbnail a youtube video plays (which doesn't work)
Facebook seems to know that there is a video to be played, but doesn't want to go through with it.
My code:
<meta property="og:image" content="<url>" />
<meta property="og:site_name" content="<name>" />
<meta property="og:description" content="<description>" />
<meta property="og:video" content="http://www.youtube.com/v/S3_AwK3ujQI&fs=1" />
<meta property="og:video:width" content="560" />
<meta property="og:video:height" content="315" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<link rel="video_src" href="http://www.youtube.com/v/S3_AwK3ujQI&fs=1" />
<meta name="video_type" content="application/x-shockwave-flash" />
<meta name="video_width" content="560" />
<meta name="video_height" content="315" />
What seems to be wrong? I read somewhere that the solution has to do something with SSL, but since I link to a external YouTube video that shouldn't be the case; or is it?
You also need an og:picture. Using https for the video url will let it play for people who have Facebook on secure. Go to a youtube page and check out what they're using for og tags.

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