: Prompting Facebook to embed Youtube videos from a site On a website for a newspaper, some of our articles are video reports (embedded from Youtube) with small descriptions below. When these get
On a website for a newspaper, some of our articles are video reports (embedded from Youtube) with small descriptions below. When these get shared on Facebook, perhaps when someone copies the URL into a status, is it possible to prompt Facebook to embed the Youtube video, just as it behaves if Youtube links are pasted directly?
I noticed recently that the BBC iPlayer (in the UK) had managed to embed their videos like so. You click on the link and a flash player appears. Can anyone explain how it is done?
On click becomes...
More posts by @Becky754
1 Comments
Sorted by latest first Latest Oldest Best
You'll need to add some RDFa meta data to the header of your pages which contain video. For Facebook specifically, you'll need to add a <link rel="image_src" href="/URL/TO/VIDEO_THUMBNAIL.jpg" /> tag to indicate the video thumbnail, and a <link rel="video_src" href="/URL/TO/PLAY/VIDEO" /> to indicate the video player. Note that the video_src tag should refer to a URL which will actually play the video, not the video source file itself. So if you use a SWF to play the video, and the video ID is 123, that URL should be something like domain.com/video.swf?vid_id=123.
Those are the only two required variables, for Facebook. Other optional properties, which should be specified in meta tags include: medium, video_width, video_height, video_type and description.
Also note, it may take a bit of time after successfully adding these tags for Facebook to actually crawl your pages and start showing the video snippets.
There are additional ways to markup video properly in HTML pages. You can read more about these formats from Google.
Also, for testing your markup, the Facebook Debugger will likely come in very handy.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.