January 17, 2011

Autodiscover your Twitter Feed with Blogger

When using Blogger, the RSS autodiscovery tags for our blog feeds are automatically generated, enabling visitors to easily subscribe for updates by clicking the orange icon in our browser's address bar:

Many bloggers use Twitter to promote their website and add an extra stream of conversation to our blog. In addition to adding a Twitter photostream or link to our Twitter profile in our layout, we can add autodiscovery tags to our template, enabling visitors a simple and alternative means of subscribing for updates.

It's very easy to add autodiscovery for alternative feeds to our Blogger templates. Simply go to Design>Edit HTML in your Blogger dashboard and locate the closing </head> tag in your template.

Immediately before this, paste the following code, replacing YOUR-TWITTER-USERNAME with your own username:

<link rel="alternate" type="application/atom+xml" title="Twitter: YOUR-TWITTER-USERNAME" href="http://twitter.com/YOUR-TWITTER-USERNAME" />

Then save your template.

Now when you visit any page of your Blogger site and click the RSS icon in the address bar, the drop down list will include a link to view your Twitter profile page and updates. I'm not able to get a screenshot on my computer, so if you'd like an example click the RSS icon in the address bar when visiting Blogger Buster to see this function in action.

This method may also be used to add other RSS feeds for discovery, such as your Flickr photostream or a feed for a specific label. Simply replace http://twitter.com/YOUR-TWITTER-USERNAME with the URL of the feed you'd like to add.

I hope you find this short tutorial offers a useful method of adding autodiscovery to your Blogger template. Please feel free to add your opinions and comments below.

Update: I've updated the code to use a slightly altered syntax which should be more compatible with newer browsers. Please let me know if this works for you (or not) in the comments section.

Advertise on Blogger Buster

Browse through the Archives

All existing posts are still available to view while I'm working on the site, albeit seen in a much simpler interface. Feel free to browse through the archives to find tutorials, templates and articles to help you build a better blog:

© Blogger Buster 2010 Home | About | Contact | Hire Me | Privacy Policy