Displaying a Twitter badge from Twitter cannot be done directly in Google Sites. Using a Google Gadget, we can insert an Interactive Flash badge (require Flash version 9) or a Read-only Badge. We need a Google Gadget to insert the new badge from twitter (sept. 2009).
Flash Badge - Code from Twitter (MySpace Widget)With this first option, we get an interactive widget. Twitter give us a code like this :
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" width="290" height="350" id="TwitterWidget" align="middle"> <param name="allowScriptAccess" value="always" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#000000" /> <param name="FlashVars" value="userID=25487744&styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml"> <embed src="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" quality="high" bgcolor="#000000" width="290" height="350" name="TwitterWidget" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="userID=25487744&styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml"/> </object> We cannot insert these code directly into Google Sites. We must use a Google Gadget which contains a Generic Flash Player.
As File parameter of the gadget, we enter the movie value and the FlashVars value concatenated by a question mark.
http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf?userID=25487744&styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml URL of the gadget
The ResultRead-only widget
Twitter give us a code like this :
<div style="width:176px;text-align:center"><embed src="http://twitter.com/flash/twitter_badge.swf" flashvars="color1=6710988&type=user&id=25487744" quality="high" width="176" height="176" name="twitter_badge" align="middle" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br><div style="width:176px;text-align:center"><a style="font-size: 10px; color: #6666CC; text-decoration: none" href="http://twitter.com/prac53">follow prac53 at http://twitter.com</a></div>
We use the same Generic Flash Player as above, and we manually add the link at the bottom of the gadget (Follow...) . Again, as File parameter of the gadget, we enter the src value and the FlashVars value concatenated by a question mark. http://twitter.com/flash/twitter_badge.swf?color1=6710988&type=user&id=25487744 Color1 parameter : The value is just the standard hex code of color, in base 10, i.e (6666cc) base 16 = ( 6710988) base 10
The Result
Problems with the Flash Badge from TwitterFollowing updates (2009-04-12) of API, My Space widget has been broken, the widget returns this method requires a GET when we try to log in. In the meantine, we can use the Feed from Twitter and a Feed gadget. URL of the gadget
New Widget for your site
Here is my tweets
Important note
Using the feed gadget is the only way to open a tweet in a new window !!
More informationsFind Wine
|





