PubSubHubbub is a fancy name for a rather new protocol being promoted by various services like FriendFeed, which allows you to receive updates of RSS feeds without polling.
Basically it will allow blogs and readers to communicate real time, in a push-like method, like instant messaging, and not via pulls like the way it happens now, which can take minutes or even hours (for an explanation of push and pull technologies, you can read my previous post about it).
The cool thing about PubSubHubbub is that it works on top of existing protocols (in this case Atom) so readers and source don’t have to change much. The only thing you need is to notify a server that you published and the clients have to be subscribed to that server. Dave Winer has a good, deeper, explanation of how it works.
In this tutorial I will show you how to implement PubSubHubbub in a self-hosted installation of WordPress, using Feedburner for feed distribution and FriendFeed as the receiving client. With this system in place, your blog posts will appear in your FriendFeed in a matter of seconds.
Let’s start with WordPress. You need to make sure that your auto-discovery RSS feed is pointing to feedburner instead of your own blog’s feed.
The way to check for that is to do a view source of your blog. On the header, you must see this:
<link rel=”alternate“ type=”application/rss+xml“ title=”jungleG RSS Feed“href=”http://feeds.feedburner.com/jungleg” />
Be careful, as some themes do not handle this properly, so you might need to manually edit the “header.php” or similar template and hardcode the Feedburner address.
I use a plugin to handle all my Feedburner chores called FD Feedburner.
Even though my blog’s feed is located at jungleg.com/feed, I don’t want the services to subscribe to this, as WordPress won’t be able to ping the clients subscribed to the blog. We want to leave that to Feedburner, which has implemented this properly.
For the images on your blog to show up in FriendFeed, I have enabled the MediaRSS plugin, but that might not be necessary, as Feedburner pulls those fine. But if images aren’t showing up for you, try installing it.
We now move to Feedburner. Make sure you have the Ping Shot option checked:

This allows Feedburner to ping FriendFeed or any other subscribers that you have posted new content.
Last, but not least, you will need to configure FriendFeed. What you want to do is setup your feed to point to the Feedburner RSS feed URL (in my case http://feeds.feedburner.com/jungleg) and not your regular blog URL or regular feed URL. That way FriendFeed is directly pinged by Feedburner instead of waiting for our blog to do so, which as I said earlier won’t work.
If you want the excerpts to show, you might want to setup your feed as a Custom RSS/Atom feed and check the ”Include entry description as a comment” option (thanks Ivan for the tip).
You’re all set. You should now be able to see your posts come up in FriendFeed as soon as the WordPress Cron (wp-cron) process is run by your blog. This might be immediate or take a minute or two to be triggered (if you’re seeing your apache logs real time, you’ll something come up like the line below (click on the line to see it in full).
I want to give a special thanks to Brett Slatkin for always being there for me throughout this process.
Now let’s see how this post goes up realtime on FriendFeed.
{ 58 comments }
