Fresh tweets on the blog

I’ve long wanted to show my latest tweet in the blog’s side­bar, as a sort of status message. I’ve just made a ver­sion that suits me 100%: a single latest tweet is shown, as a link to my whole pro­file on Twitter.

How you can do it:

Option 1. For Drupal there’s the Twitter module. I expected it to create a block for show­ing the latest tweets on the site’s pages, but for some reason that didn’t happen. Apparently you can use Views, but I couldn’t be both­ered to dig into it any further. Other CMSs surely have sim­i­lar mod­ules and var­i­ous ways of show­ing your latest tweets.

Option 2. Every Twitter user’s pro­file has a nice little thing, the “RSS feed of user’s tweets”. You can take that RSS feed and try var­i­ous ways (like this one) of putting its con­tents on your blog. But: the mes­sages in that feed come in a not very suit­able form, “Username: tweet text”, and if you’re going to show sev­eral tweets in the side­bar, it will look ugly.

So, solu­tion number 3: take the RSS feed of your tweets, drop it into the pipe I’ve prepared in advance, set how many tweets you want to show, make the pipe do its run (the ‘Run pipe’ button) and take the RSS it produces. You get the number of fresh tweets you asked for, with the silly prefix cut off, link­ing to your Twitter profile.

Works for now :)