Integrating Facebook With WordPress

Despite Facebook being the most successful of all of the social media sites, I’ve never made WPShout a presence on the site or attempted to integrate Facebook onto WPShout in any way. I tend to view Facebook as more personal and other sites such as Twitter more appropriate for both marketing the site and interacting with the people who read it.

However, that doesn’t mean that you can’t or shouldn’t integrate Facebook with WordPress. This post will attempt to outline the various ways you can integrate the two in question and answer format.

Which are the best Facebook plugins?

Is an excellent question and one which over the course of this post I shall attempt to answer. Regular Shout readers will know, though, that I’m a strong advocate of doing a little bit of coding and not using a plugin for everything, a trend I shall follow in this post.

How can I add a Like button to posts?

Facebook has a series of “social plugins” which are an excellent place to start for all sorts of little code snippets — and this includes Like buttons.

Their website explains it much better, but the basic embed is:

<iframe src=""scrolling="no" frameborder="0"  style="border:none; width:450px; height:80px"></iframe>

But of course, manually changing your URL isn’t practical, so replacing YOUR_URL with <?php the_permalink(); ?> will automatically add the current post’s link:

<iframe src="<?php the_permalink(); ?>"scrolling="no" frameborder="0"  style="border:none; width:450px; height:80px"></iframe>

There are, of course, an endless number of plugins  which will do the same job for you. If you’re after one of the aforementioned plugins, Like seems to be a solid option.

How can I let users comment with their Facebook profiles?

Excellent question! There are quite a few neat little plugins which will do this for you. Facebook Comments for WordPress looks like an impressively comprehensive choice. Whilst this is never something I’d do on Shout, I will admit it could be quite handy to let your visitors comment with their Facebook profiles to save them filling out the Name, URL and email every time they visit your site (although a lot of visitors will have this saved with their browser, so don’t use it for that reason alone!).

How can I embed content from Facebook into posts?

The trend of oh, there’s a plugin for that continues here, with the Embed Facebook plugin providing this function.

The plugin literally takes any link to a public page, album or whatever and embeds the content into your post — the plugin’s site has the picture below showing you how to use it:

This could get a bit annoying — personally I would have preferred a shortcode so if I wanted to link to something on Facebook without embedding it I could.

How do I get a widget like box?

Ah, the old “like box” in convenient widget format that everyone has!

This is another case of get the plugin cause it’s vastly more convenient. I’m sure there are ways of doing it manually, but in this case, the plugin is just so much easier. Facebook Fan Box seems to be the one to go for here.

How can I automatically post to Facebook?

There are all sorts of plugins that’ll do this for you and they’re not very interesting so you can just read them in convenient list based format on this handy website.

How do I…

And that concludes today’s post. If you want to know how to do other exciting things, comment and I’ll see what I can do!

Most Voted
Newest Oldest
Inline Feedbacks
View all comments
August 22, 2012 6:28 pm

I’m looking for a plugin that will automatically create a new post from a Facebook Friends List or a Interest List. So every post from people on my “list wall” will get a wordpress post in a specified category.

Does this exist? For the life of me, I can’t find one.


November 23, 2011 6:57 pm

Although you are not using Facebook for promotion but still you have very good knowledge of Facebook sharing plugins.

November 17, 2011 12:59 pm

awesome post indeed. thank you so much, it was helpful.

A Free wordpress newsletter » Weekly Roundup #9 and #10
October 29, 2011 3:33 am

[…] Alex Denning has published a great post on how to Integrate Facebook with WordPress. The article tries to answer simple frequently asked questions on plugins, Like buttons, commenting […] » Weekly Roundup #9 and #10
October 29, 2011 3:03 am

[…] Alex Denning has published a great post on how to Integrate Facebook with WordPress. The article tries to answer simple frequently asked questions on plugins, Like buttons, commenting […]

Ash Robbins
October 27, 2011 8:07 am

It would be interesting to hear a bit more in depth on some of your points. For example why would you never use Facebook comments here on this site?

And would you say it’s better use the Facebook Fan Box plugin as you’ve said here or Facebook’s own Like Box code?

October 27, 2011 6:46 am

very helpful post thanks lot