Twitter is a service for friends, family, and co–workers to communicate and stay connected through the exchange of quick, frequent answers to one simple question: What are you doing?
Follow these steps to install this script on your wiki.
http://scripts.mindtouch.com/twitter.xmlRelated Links: DekiScript service, Extension Overview, DekiScript Overview, Extension Demos.
This extension contains functions for embedding Twitter feeds. This script requires MindTouch Deki 1.9.0b or later.
Functions:
Embed Twitter feed of user and friends.
Parameters:
| Name | Type | Description |
| name | str | Twitter user name. |
| width | num | (optional) Control width. (default: 200) |
| height | num | (optional) Control height. (default: 400) |
| oddbubblecolor | str | (optional) Color for bubbles on odd rows. (default: "0xFFFFCE") |
| evenbubblecolor | str | (optional) Color for bubbles on even rows. (default: "0xFFDAAA") |
| oddtextcolor | str | (optional) Text color for odd rows. (default: "0x4A396D") |
| eventextcolor | str | (optional) Text color for event rows. (default: "0xBA0909") |
| backgroundcolor | str | (optional) Background color. (default: "0x111B1C") |
Show Twitter counter for user.
Parameters:
| Name | Type | Description |
| name | str | Twitter user name. |
Show latest Twitter entry from user.
Parameters:
| Name | Type | Description |
| name | str | Twitter user name. |
| width | num | (optional) Control width. (default: 176) |
| height | num | (optional) Control height. (default: 176) |
| backgroundcolor | str | (optional) Background color. (default: "0x111B1C") |
<extension>
<title>Twitter Extension</title>
<label>Twitter</label>
<copyright>Copyright (c) 2008 MindTouch, Inc.</copyright>
<description>This extension contains functions for embedding Twitter feeds.</description>
<uri.help>http://wiki.developer.mindtouch.com/MindTouch_Deki/Extensions/Twitter</uri.help>
<uri.logo>http://scripts.mindtouch.com/logos/twitter-logo.png</uri.logo>
<namespace>twitter</namespace>
<requires host="MindTouch Deki 1.9.0b" />
<function>
<name>all</name>
<description>Embed Twitter feed of user and friends.</description>
<param name="name" type="str">Twitter user name.</param>
<param name="width" type="num" optional="true">Control width. (default: 200)</param>
<param name="height" type="num" optional="true">Control height. (default: 400)</param>
<param name="oddbubblecolor" type="str" optional="true">Color for bubbles on odd rows. (default: "0xFFFFCE")</param>
<param name="evenbubblecolor" type="str" optional="true">Color for bubbles on even rows. (default: "0xFFDAAA")</param>
<param name="oddtextcolor" type="str" optional="true">Text color for odd rows. (default: "0x4A396D")</param>
<param name="eventextcolor" type="str" optional="true">Text color for event rows. (default: "0xBA0909")</param>
<param name="backgroundcolor" type="str" optional="true">Background color. (default: "0x111B1C")</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<embed src="http://static.twitter.com/flash/twitter_timeline_badge.swf"
eval:flashvars="'user_id=' .. string.match(web.text('http://twitter.com/' .. args.name, '//_:link[@type=\'application/rss+xml\']/@href' ?? ''), '.*/(\\d+).rss') .. '&color1=' .. (args.oddbubblecolor ?? '0xFFFFCE') .. '&color2=' .. (args.evenbubblecolor ?? '0xFFDAAA') .. '&textColor1=' .. (args.oddtextcolor ?? '0x4A396D') .. '&textColor2=' .. (args.eventextcolor ?? '0xBA0909' ) .. '&backgroundColor=' .. (args.backgroundcolor ?? '0x111B1C') .. '&textSize=' .. (args.textsize ?? 10)"
eval:width="web.size(args.width ?? 200)"
eval:height="web.size(args.height ?? 400)"
quality="high"
name="twitter_timeline_badge"
align="middle"
type="application/x-shockwave-flash"
allowScriptAccess="always"
pluginspage="http://www.adobe.com/go/getflashplayer" />
</body>
</html>
</return>
</function>
<function>
<name>current</name>
<description>Show latest Twitter entry from user.</description>
<param name="name" type="str">Twitter user name.</param>
<param name="width" type="num" optional="true">Control width. (default: 176)</param>
<param name="height" type="num" optional="true">Control height. (default: 176)</param>
<param name="backgroundcolor" type="str" optional="true">Background color. (default: "0x111B1C")</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<embed src="http://twitter.com/flash/twitter_badge.swf"
eval:flashvars="'id=' .. string.match(web.text('http://twitter.com/' .. args.name, '//_:link[@type=\'application/rss+xml\']/@href' ?? ''), '.*/(\\d+).rss') .. '&type=user&color1=' .. (args.backgroundcolor ?? '0x111B1C')"
quality="high"
eval:width="web.size(args.width ?? 176)"
eval:height="web.size(args.height ?? 176)"
name="twitter_badge"
align="middle"
allowScriptAccess="always"
wmode="transparent"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</body>
</html>
</return>
</function>
<function>
<name>counter</name>
<description>Show Twitter counter for user.</description>
<param name="name" type="str">Twitter user name.</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<a rel="custom" eval:href="uri.appendquery('http://twittercounter.com', { username: args.name })" eval:title="'TwitterCounter for @' .. args.name">
<img width="88" height="26" eval:src="uri.appendquery('http://twittercounter.com/counter', { username: args.name })" style="border: medium none ;" eval:alt="'TwitterCounter for @' .. args.name" />
</a>
</body>
</html>
</return>
</function>
</extension>