RationalSpace

Posts Tagged ‘embed video

Sharing videos to play embedded within Facebook

leave a comment »

So you have created good video content and have put it up on your website. How do you make it shareable on facebook?

Well, you can put a share button that facebook provides and the appropriate og meta tags on the page. Here is a set that facebook tells us to put in the page.

Now, in a typical scenario where you might have put your videos on Amazon S3 or your own Server, then clicking on the facebook share button will share the page of your website on which the video is embedded. It will not really embed the video in the news feed of facebook. Embedding in facebook news feed is much more useful as the users can click there itself and play the video. He need not go to one more page and again click play there. So the chances of your content going viral is more if the video that we share on facebook plays there itself.

This basically requires 2 things:

  • All your videos should be hosted on a secure URL i.e a URL starting with “https://” . Now you can get this done by applying for an SSL certificate for your website and enabling that on your server. However, if you are on Amazon AWS, you can do this very simply by using “Cloudfront”. You can create a cloudfront distribution – choose the S3 bucket that stores the videos and configure it.  Cloudfront by default gives an SSL certificate. Cloudfront does not give us very pretty URLs but then it suffices for the purpose of sharing. Also make sure that you have selected support for both HTTP and HTTPS on the cloudfront.
  • You also need a “SWF” / Flash player. Also this player should be hosted on the same S3 bucket which is behind the secure cloudfront. Basically, the flash player URL also needs to be secure. I used flow-player SWF  for this purpose but you can use whatever you like.

Here is a working demo.

Advertisements

Written by rationalspace

April 27, 2015 at 5:45 pm

Posted in Frontend, Social Media

Tagged with ,

%d bloggers like this: