How To Add The Facebook ‘Subscribe’ Button To Your WordPress Site

Let people subscribe to your Facebook updates from WordPressToward the end of last year, Facebook released their new ‘Subscribe’ button to webmasters, allowing people to embed the button on their own blog or website.

The subscribe function in Facebook allows you to follow updates from people who you’re not friends with. Any Facebook user can now broadcast themselves to a public group of followers, Twitter-style, while reserving private status updates for their Facebook friends.

So if you’re a WordPress blogger and want to use Facebook to expand your reach, adding the subscribe button to your site is a pretty logical idea.

Adding the subscribe button to your site

Step One

You need to allow people to subscribe to your Facebook profile. If you haven’t yet done this, read the instructions here.

Let people subscribe to your public Facebook updates

If you’re trying to build a public following on Facebook, it’s a good idea to customize your profile URL. By default, your URL is just a bunch of numbers, but you can go to www.facebook.com/username and change it to something more memorable.

Featured Plugin - WordPress Q&A Site Plugin

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Step Two

Venture over to the Facebook Developer site, where you can get the code for your own subscribe button.

Add the subscribe button for Facebook to your website

The process is fairly self-explanatory. You need to enter your own Facebook profile URL for the subscribe link. (For the purposes of this tutorial, I’m just using Mark Zuckerberg’s URL, which is listed by default).

You’ll need to play around with the color and width settings to get the right look for your own WordPress theme. You can also choose from three different display formats: standard, button count and box count.

Step Three

Once you’ve got the dimensions and display format right, you need to choose how you will embed the ‘subscribe’ button on your site. You have three options: HTML5, XFBML and IFRAME.

How to embed the subscribe button on your WordPress site

Using the HTML5 or XFBML code will give you greater control over how the button looks on your site, but it’s a more involved process. You’ll need to hack around in your template files and add the JavaScript SDK. You’ll also need a Developer App ID from Facebook, which can be obtained here.

If you just want a basic solution and don’t need to do any serious customization, go for the IFRAME option. This HTML code can be placed straight on your site, wherever you want the button to display.

The end result

I’ve added the IFRAME code to a sidebar widget in the Twenty Eleven theme, and this is what it looks like:

Add the Facebook subscribe button to your WordPress site
You'll probably never have as many subscribers as old Zuckerberg . . . sorry

And that’s all there is to it. Your readers can now sign up for your public updates on Facebook, directly from your WordPress blog.

Looking for more WordPress-Facebook integration tools? Check out Ultimate Facebook from WPMU DEV. This plugin is regularly updated and has everything you’ll ever need to connect your WordPress site harmoniously with Facebook.

Photo: Mr. Guillotine.

Comments (21)

  1. What type of widget did you put the iFrame (or HTML code) into? I currently have the Oulipo theme on my wordpress blog. I don’t see any widgets that allow HTML codes (other than the Text one, but HTML codes dont seem to work with it.)
    Can you help me out?

    Thanks,
    Erika

    • Hey Erica,

      I was using the text widget in this example. Have you double-checked that the iframe HTML won’t work on your site, using the standard WordPress text widget?

      Let us know if you still can’t get it working.

      Cheers,
      Tim

      • Thanks for responding Tim!
        For some reason it still won’t work. Is it just that the theme I have won’t allow HTML widgets?

        When I do the HTML5 code in the Text widget, it displays on my blog as just the HTML writing.
        When I do the iframe HTML in the Text widget, it displays as a link to the url.

          • Actually, the way I did that was just took a screen shot of what my subscribe button would look like through the facebook generator & then img linked it to my page. haha

            But I’m still unable to do it through the html code. It worked with Google+ & Linkedin, but for some reason not Facebook?

  2. Thanks for sharing, I can get it done by means of the widget. But what I’m looking for is to place the follow-button underneath every blog, is that possible?

Participate