Embed Facebook Posts in WordPress

Category: Beginner

For as long as Twitter has been in existence, you would have known that embedding Tweets into your posts is a relatively easy job. In the embedded tweets, if you were logged in, you could reply, favourite, retweet or even follow the user! The case with Facebook, however, was not so straight forward, which meant you either had to give a link back to the original content or post a screenshot. However, neither of these ways were interactive and there was no way the user could perform any Facebook related actions without leaving your site.

Recently, however, Facebook introduced embedded posts for websites, including and not limited to WordPress, as a social plugin, which would enable you to add it to your blog or site with just a single line of code. Although it was not available to everyone at the time of the launch, Facebook has slowly provided this feature to all the users.

How does Facebook make sure that the privacy issues are not violated? Well, they take the simple way out by allowing only posts which are shared publicly to be embedded elsewhere. To find if a post is public, look for the globe icon next to the time stamp under the title of the post.

Do it manually through Facebook:

To take out the raw code and copy-paste it on your site, open a public post on Facebook and click the arrow on the top right. From the option(s) that appear(s), select ‘Embed Post’.

From the dialog box that appears, you can have a look at the preview of the embedded post, once it is put on your website. If you are happy with the preview, copy the code that appears as shown below.

Once you have copied the code, move on to the ‘Add New Post’ page by going to WP Admin > Add New.

Choose the Text tab on top (Visual is selected by default), and paste the code wherever you want it to be.

Once you hit publish, your post would look just like the screenshot below.

Another way of generating the code is by visiting the social plugin’s page on the Facebook developer site. Just paste the permalink to the post and see a preview of the post under the text box.

Click on Get Code to get the embed code for your site. You have a variety of options here to embed your post, but only the HTML 5 and XFBML options have been implemented for the plugin as of now. Select one of them and follow the instructions given there about where to place it in your code.

Use the Facebook Plugin:

Another easy way to embed posts is by using the official Facebook plugin for WordPress. Although the primary motive of this plugin is to publish your posts to Facebook, it can also be used to do the reverse and embed Facebook posts in your WordPress site.

To use the plugin, you can either download it from the plugin’s page on the WordPress site, or search for Facebook under Plugins > Add New.

To embed posts using the plugin, you would need to have the Facebook post’s permalink. To do so, click on the time stamp under the title of the post. This process is so simplified that all you need to do is paste this link into your post wherever you want it to be!

It’s that easy. To make sure it’s working check the preview of the post by click on ‘Preview’.

You can interact with the embedded posts like liking the page, the status, share or comment on it. Such interactivity is surely going to drive more traffic to your page.

With the introduction of embedded posts, Facebook has made a good stride in social media with respect to its competitors such as Twitter and Google. The next step for them should be to enable the oEmbed protocol (which Twitter already does), which would make integration with WordPress easier. Till then, the ways mentioned here are the easiest options.

We hope that this post helped you embedding your Facebook posts on your site. To make sure you use the full potential of Facebook, make sure you use other social plugins in addition to this one, like the like box and the like button!

Author Bio

Shaumik Daityari

Shaumik is an optimist, but one who carries an umbrella. An undergrad at IIT Roorkee, he loves writing, when he's not busy creating some awesome stuff. Find him on and Twitter.

Leave a reply

Appointment Booking Plugin for Wordpress