Saturday, September 12, 2009

How to Embed Facebook Videos in your Web Pages

Source: http://www.labnol.org/internet/embed-facebook-videos-in-web-pages/9715/

facebookAnyone can upload video clips to the Facebook site but unlike YouTube and other online video sharing sites, Facebook doesn’t (officially) provide an embed code for their videos. That’s a problem for two reasons.

#1. You found a very interesting video on Facebook but how you do share it with your blog readers since there’s no code to embed that video into your site.

#2. You can watch video clips on Facebook only if you are logged into your Facebook account. How do you share these video clips with people who aren’t members of Facebook?

How to Add a Facebook Video to your Web Site

Here’s a simple trick that will let you embed any Facebook video into your web pages.

facebook videos

Every video uploaded on Facebook has a unique ID that you can find in the browser’s address bar (look for the value of parameter "v").

Copy that number and replace it with xxx in the code below.

<object width="400" height="224" >  <param name="allowfullscreen" value="true" />  <param name="allowscriptaccess" value="always" />  <param name="movie" value="http://www.facebook.com/v/xxx" />  <embed src="http://www.facebook.com/v/xxx" type="application/x-shockwave-flash"    allowscriptaccess="always" allowfullscreen="true" width="400" height="224">  </embed> </object> 

Now you can put that code on any web pages and the video will play just fine.

For instance, here’s a Facebook video uploaded by the founder himself – you can watch it here itself without having to become a Facebook member.

Related: How to Embed Almost Anything in your Website