Navarr's Tech Side The Technical Side of my Life

24Feb/080

JavaScript: Changes to the Simple Twitter Feed

Recently, I had resumed working on the Simple Twitter Feed, and decided to make some improvements after reading Dave Winer's "What am I up to?" post.

So, the Simple Twitter Feed has one fix, and four additional optional parameters.

start STR - Symbol or Text to look for at the beginning of a post
time BOOL - Whether or not to display the "about x minutes ago"
client BOOL - Whether or not to display the "from x"
br BOOL - Whether or not to place a break between the tweet and the extra data

The simple fix is that the count parameter would check the last (x) amount of tweets, whereas now it displays up to (x) amount of tweets.

12Feb/0814

JavaScript: Simple Twitter Feed

This is code that I will kindly let anyone use.  It only works with public twitter accounts, however, but it is perfect for placing on any web page.

First we have the Inclusion of the File (can only be included once per page). Then the HTML for where the Twitter Feed is going to go, and then the JavaScript to include the file.

<script type="text/javascript" src="http://www.gtaero.net/twitter/twitter.php?user=USERNAME"></script>
<div id="twitFeed">Optional Placeholder Text</div>
<script type="text/javascript">twitter2id("twitFeed");</script>

Feel free to use this code anywhere you want to.  It is my gift to you!

UPDATE: Some additional (optional) variables have been added to the script for further tweaking.

February 24, 2008.

UPDATE: Support for twitter lists and turled profiles has been added to the script.  Your script might break with these changes, please view the post for more information.

October 30, 2009.