Twitter Widget HTML Code
For some reason Twitter decided to remove the HTML code to show tweets/updates on your website in favor of a scrolling loop flash widget, don’t get me wrong there’s absolutely nothing wrong with it but for me its a bit overkill. Sure, there are plenty of plug-ins available to show tweets, but all I wanted was to display nothing but the text of said Twitter updates and have complete control over the way they look.
So here’s the code :
<div id="twitter">
<ul id="twitter_update_list"></ul>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/USERNAME.json
?callback=twitterCallback2&count=4"></script></div>
Be sure to change USERNAME to your own Twitter ID (or anyone’s ID if you really want to) and change count=4 to whatever number of tweets you want to display. The main advantage of using this as opposed to the new Twitter widgets, is that by wrapping it in some CSS code you can control pretty much every aspect of the look to suit your taste (this includes the removal of bullets) and/or existing web design.
Your code helped me sort out a problem I had, so many thanks! Now I cannot work out why the donate buttons on http://rowingagainstslavery.blogspot.com do not work in IE but are fine in FF!
I’m trying to use Twitter to serve as a quick way for our youth sports club to publish last minute updates, announcements, etc. and I would like to publish the Tweets on our website. This HTML code works great (the flash versions are not supported on our website) so first problem solved. Now I have the problem that I must provide a username and password to gain access to the Tweets. Can this info be put in the HTML code?
Thanks Rik, great script! Do you know how I can lose the bullet?
Thanks for the code!