Home > How To > Embedding Twitter into your WordPress Blog

Embedding Twitter into your WordPress Blog

Update 07/02/10: Please note that there is now an official wordpress widget for twitter. As such, hosted wordpress accounts are no longer constrained by not being able to use third party addins described in my previous update.

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. πŸ™‚

  1. June 25, 2008 at 11:41 am

    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. June 25, 2008 at 2:02 pm

    Thanks Darragh πŸ™‚ Its nice to get positive feedback ! πŸ™‚

  3. matthewjamesorlando
    July 17, 2008 at 3:28 am

    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?


  4. July 17, 2008 at 8:50 pm

    Thanks Matthewjamesorlando πŸ™‚ Feel free!

  5. jscott
    July 27, 2008 at 11:01 pm

    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

  6. July 30, 2008 at 4:30 pm

    Cool! Thanks for the tip Jscott! πŸ™‚

  7. Ian Weatherburn
    October 2, 2008 at 8:01 pm

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

  8. December 25, 2008 at 1:52 am

    Totally awesome. Thanks so much for this!

  9. December 25, 2008 at 1:26 pm

    Hi Yogagrrl, my pleasure. πŸ™‚

  10. cougarmicrobes
    February 24, 2009 at 6:10 pm

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

  11. darowh
    March 2, 2009 at 5:25 pm

    Great post, thank you for the assistance!

  12. July 27, 2009 at 4:09 am


    Instructions are fantastic. THX!. πŸ™‚

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

  13. August 11, 2009 at 4:04 am

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

  14. August 11, 2009 at 4:06 am

    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?

  15. August 11, 2009 at 4:08 am

    Ooops, just found out that wordpress already got the twitter widgets. Sorry.. πŸ™‚

  16. September 11, 2009 at 7:02 pm

    Yes I should update that wordpress now has an official plugin which I am now using instead of this method. πŸ™‚

  1. July 18, 2008 at 5:25 pm
  2. September 20, 2008 at 5:13 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: