Quantcast
Channel: developers
Viewing all articles
Browse latest Browse all 54

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

$
0
0

Toward 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.

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.


Viewing all articles
Browse latest Browse all 54

Trending Articles