Why am I still typing?’s Weblog

Warning, may or may not contain nuts….

Embedding Twitter into your WordPress Blog

Posted by Konrad on June 23, 2008

Update 22/03/09: Please note this method describes integrating your twitter account / feed with your hosted wordpress blog. If you are hosting your wordpress CMS yourself, there are a number of plugins and / or widgets you can use (nice round up here) instead as you can change the templates and are also not bound by the ‘no scripting’ limitation of hosted wordpress blogs. I initially wrote it back in June 08 but the method still works well to this day. If you have any questions please feel free to ask me via email (on my about page) or on Twitter @KonradS.

Many of you will be familiar with Twitter, a short message microblogging platform used by the ‘technorati’. I wanted to utilise this platform in order to display my updates as a widget on my wordpress blog. Initially I encountered difficulties given that WordPress sanitises all scripting. As such, default twitter ‘badges’ are useless. I was about ready to give up, when I found out that Twitter has RSS feeds for every account.

Initially I hit a brick wall with this as well, the main RSS feed (http://twitter.com/statuses/friends_timeline/insertuseridhere.rss) was for your friend’s updates, not yours and required you to be logged in with Twitter. This clearly is not that useful. However, there is a second feed, a user_timeline feed which does not require you to be logged in and only shows your updates.

The URL for this is : http://twitter.com/statuses/user_timeline/14526317.rss (substitute 14526317 for your twitter user id.) It is a little tricky to find this URL and to be truthful – I did this a few weeks ago and have completely forgotten where I found it, but it is there somewhere.

To find your own twitter ID, the quickest way is to goto the RSS button on your Home page. This is found on the bottom left part of the feed section. This RSS feed is not the right one, but it contains your numerical ID number. By substituting your twitter ID into the user timeline in the above paragraph, you will save yourself some ferreting.

Anyway, combine your RSS feed with the WordPress RSS widget and hey presto – a customisable, configurable Twitter feed widget. :)

18 Responses to “Embedding Twitter into your WordPress Blog”

  1. Darragh said

    Hey after TRAWLING google for the answer to this question, yours was the ONLY ONE that made any sort of sense, so thank you from Ireland, it’s very much appreciated :)

  2. Thanks Darragh :) Its nice to get positive feedback ! :)

  3. matthewjamesorlando said

    Thanks a lot for this information. Every other site required me to have a degree in Astrophysics. It’s refreshing to have someone plainly tell you to switch “friends” to “user”.

    Mind if I link to your blog?

    Cheers!

  4. Thanks Matthewjamesorlando :) Feel free!

  5. [...] would like to thank Why am I Still Typing for the easy to use [...]

  6. jscott said

    You can skip the numeric ID all together… Substitute you user name in the URL for the feed.

    eg: http://twitter.com/statuses/user_timeline/jscott.rss

  7. Cool! Thanks for the tip Jscott! :)

  8. [...] this if you need help. Takes less than a minute. ;D Filed under: BlackPocketed [...]

  9. Ian Weatherburn said

    Hey, great stuff. Works wonderfully. Thank you for the simple and elegant solution.

  10. yogagrrl said

    Totally awesome. Thanks so much for this!

  11. Hi Yogagrrl, my pleasure. :)

  12. cougarmicrobes said

    thanks for that, youve made my blog this [_________] much more interesting.

  13. darowh said

    Great post, thank you for the assistance!

  14. aguitta said

    Hello,

    Instructions are fantastic. THX!. :)

    Wondering if there is a chance to show the tweets of the people I am following on rss feed?.

  15. Hmm, thanks for the info. How can I omit my id being mentioned in the entry?

  16. And I want to publish it exactly the way you have it in this blog: just the entry, followed by the minutes/hours it was posted from. How can I do that, please?

  17. Ooops, just found out that wordpress already got the twitter widgets. Sorry.. :)

  18. Konrad said

    Yes I should update that wordpress now has an official plugin which I am now using instead of this method. :-)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>