2007-07-21

Embedded Twitter in your Web Site

twitter.png

Twitter is a pretty cool social application that allows friends to say current with what each other is doing on a daily basis. Recently I found out about their badges that allow you to embed Twitter content into your web pages.

Here are two examples and the code that produced them. Simply replace nullman with your Twitter username.

<div class="twitter">
  <h2 class="twitter-title">Twitter Flash</h2>
  <object type="application/x-shockwave-flash"
          data="http://twitter.com/flash/twitter_badge.swf"
          quality="high"
          width=176
          height=176>
    <param name="movie"
           value="http://twitter.com/flash/twitter_badge.swf" />
    <param name="flashvars"
           value="color1=26112&amp;type=user&amp;id=nullman" />
    <param name="wmode" value="transparent" />
    <param name="allowScriptAccess="always" />
    <param name="pluginspage"
           value="http://www.macromedia.com/go/getflashplayer" />
  </object>
</div>

You'll want to follow the instructions here to pick the color you want. However, I recommend using the above example code that I got from GIO's Blog instead of Twitter's because theirs is not XHTML compliant.