Tuesday, February 12, 2008

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.



[codesyntax
lang="xml"]<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>[/codesyntax]


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



UPDATE:
Some additional (optional) variables href="http://tech.gtaero.net/2008/02/javascript-changes-to-simple-twitter.html">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.