Unbelievable, right? yes, you have read rightly: Twitter’s tweet as feed as well as JSON.
Here is my Twitter account’s RSS feed: http://twitter.com/statuses/user_timeline/193774020.rss
You have several questions, right? Here is the steps on how to get your Tweeter accounts tweets as RSS feed:
- Copy the url posted above (that is, my one).
- You need your Tweeter user id (number, not the username). For this, go to idfromuser and get your Tweeter id.
- Replace my number part of the url with yours. That is: / user_timeline / (put your Twitter id here) . rss
- If you change the .rss with .json; you will get the JSON too. JSON can be used for Ajax call function. You will get a working example of such Ajax JSON callback function usage here: AbhishekGhosh.co.nr
- If you are further interested to create such Ajax tweeter widget of your own, here are the codes:
You need to define your CSS style sheet. For WordPress, put it in your main CSS style sheet. For Blogger, add at the end of the HTML editor where is last CSS code already exists:
}
.tweets {
-moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
background: url(“url of background with extention”) no-repeat scroll 1px -12px #EBF5F9;
border: 1px solid #B1D7E7;
clear: both;
float: left;
margin-top: 3px;
padding: 10px 10px 10px 50px;
width: 390px;
height:48px;}
.tweets ul {
list-style:none;
margin:0;
padding:0;
}
Now, the HTML part. You can use as Text Widget in the sidebar too. Background image means that Twitter bird, something like my test profile page. Here is the birdie too (right click to save it): ![]()
We are giving it as div class for usage anywhere within the body:
<div class='tweets'>
<ul id='twitter_update_list'>
<script src='http://twitter.com/javascripts/blogger.js' type='text/javascript'/>
<script src='http://twitter.com/statuses/user_timeline/put your user id here.json?callback=twitterCallback2&count=1' type='text/javascript'/>
</ul>
</div>
I have given the Twitter javascript of Blogger. It will work for WordPress too (tested). In WordPress or Blogger, if you add within the header, footer or comment part, it will appear in all pages.
Note: I have set count=1 ; that will show the last tweet. You can change it to any value (=number of tweets) you want.








Wow, thank you. Seriously. Ever since twitter’s replaced RSS with oAuth, it’s been a pain trying to figure out how to get the RSS feed regardless before I found this article.
Congrats to you for finding this!
-Justin
THANKS!
Thats awesome!..thanks a lot for this. I had one more doubt if we can see the trending items related to any specific search evrytime i login to the page?
Thank you very much and welcome.
Yes, you can do that filtering by creating an app with Twitter API (https://dev.twitter.com/).
Thank You! Will be using this on my site.