Facebook provides the video embed code for any blog to show the hosted videos on Facebook. For each video, you selected to embed on your blog, you will have to paste the embed code on your WordPress posts & pages. This process can be lengthy if you often use to embed the Facebook videos. In this post, we will create a general function for our functions.php file, and whenever we want to show, call it using the shortcode API provided by WordPress.org. For this trick, you need to buy a self hosted WordPress blog, and you can show any Facebook videos inside anywhere in your content area. Therefore, here is how to embed any Facebook videos in WordPress blog without using a plugin.

Embed your Facebook Videos in WordPress
In a very short way, you have to find the Facebook video ID you want to show on posts or pages, and paste into the posts or pages where you want to appear the video including a shortcode API provided by WordPress.org.
How to Embed any Facebook Videos in WordPress
- Copy the below code,
// Facebook Video Shortcode - WordPressians.com function wpians_fbvideo($atts, $content = null) { extract(shortcode_atts(array( "id" => '', ), $atts)); return '<object width="650" height="364" > <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="movie" value="http://www.facebook.com/v/'.$id.'" /> <embed span="" class="hiddenSpellError" pre="embed " />src="http://www.facebook.com/v/'.$id.'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="650" height="364"> </embed> </object>'; } add_shortcode("fbvideo", "wpians_fbvideo");You can set the width and height according to your theme in the above code.
- Go to functions.php file of your theme by click on Appearance » Editor, and look at the right sidebar, clicks on Theme Functions (functions.php). Paste the copied code here at the very bottom area.
- Now, whenever you want to show the Facebook video inside your posts or pages, use the below code inside your post editor.
Where XXXXXXXXX is the video ID, you want to embed. You can easily find the Facebook video ID by clicking on the video title and look on the URL that will look like as follow.
In the above example 2299062688474 is one of my Facebook video ID. Below is a preview of a Facebook video whose ID is given above.

Thank’s Friends