I finally added OAuth to TwiX, the Twitter-XMPP gateway.
Since August 2010 Twitter requires OAuth for API access. This is extremely stupid for background daemons like TwiX which do not have a user interface and especially no browser based UI.
TwiX is my C# playground. So, I needed an OAuth library for C#. TwiX runs on mono and .NET. I am running my instance of TwiX on a Linux server. Luckily almost all .NET libraries run without modification on mono.
A quick research returned several OAuth libraries, some are for ASP.NET, which I do not use, because TwiX is a faceless server daemon, not a Web application. I zeroed in on Shannon Whitley's implementation which comes with a handy sample project.
This example project has
- an OAuth core implementation
- a Twitter OAuth adapter
- a sample desktop app with embedded browser
= cool thing
I used the 2 OAuth classes in TwiX and converted the sample desktop app into a Twitter OAuth token generator tool (see screen shot). 1 hour of work, thanks Shannon.
This is a general Twitter token generator. It is not just for TwiX. The OAuthTwitterDesktopTool generates a twitter token and token secret for every Twitter app, if you know the app's consumer key and consumer secret. The OAuthTwitterDesktopTool is part of the TwiX distribution.
You can find TwiX with OAuth and the token generator on the TwiX homepage.
_happy_authorizing()
2. Januar 2011
OAuth for TwiX
24. September 2009
TwiX - Jabber Twitter Gateway Version 0.4.8
I was spamming my twitter account accidentally. Actually it was my Jabber/Twitter gateway, which got an XMPP error message from a broken jabber server and tweeted the error, then sent me a confirmation, got another error message and tweeted it again. Infinite loop!
The main problem is, that the error message looks very much like a good message. That's a Jabber "feature". A good message looks like:
<message from="JID" to="JID">If that produces an error, then comes back:
<body>...Started</body>
</message>
<message from="JID">to="JID"type="error">...which looks very much like the original message, if you do not check for the type="error" bit and just forward the body to the twitter API.
<body>...Started</body>
<error code="500" type="wait">
<internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
</error>
</message>
Fixed.
TwiX has now been updated to version 0.4.8. Get it here.
_happy_looping()
2. September 2009
Twitter Microtagging = Personal Tags
It is time for structure in Twitter. I will now start microtagging my tweets so that followers can filter and read only what they are interested in.
Hashtags are currently used for several purposes:
- Global tagging: is done in the spirit of tag-clouds to support global search for topics. example: "Official hashtag for Barcamp Bangkok 3 is #barcampbkk3".
- Comment tagging: is a very recent development. People started to add single word comments which support or augment the original tweet in form of hashtags. Example: "Got my iPhone today #happy". Nobody would search for #happy. Its just a funny (and completely valid) mis-use of tagging.
- Data tagging: to use Twitter as a data channel for later evaluation. Example: "My current #weight 72.2 kg" with the convention that after #weight follow a number and a unit. Example: "I am now at Los Angeles Airport #geoloc 33.94 -118.40" with the convention that after #geoloc follow longitude and latitude. Rarely used though and probably yet underrated.
- Follower phishing: is done by adding as many hashtags as possible to the tweet in the hope to attract attention of followers, specifically auto-followers which are triggered by certain keywords. Example: I once was followed within seconds by @timmendorf when I twittered #helgoland (both are beach holiday resorts).
I will now start to add short tags to my tweets which indicate a kind of "sub-channel" inside my tweet stream. You (or your software) will be able to ignore #dev tweets if you are not interested in my development work. You may ignore #kids tweets if you do not want to know when we are having ice cream in the local zoo. Microtags are personal tags. Everyone can define her own. They are not globally defined. Microtags have only meaning inside a single Twitter account. There might be standards later. Until then read my microtags at microtags.org to learn what they mean.
I will start with:
#life What I do, eat, where I walk and other spam
#me About me, but not the trivial #life stuff
#chat Chats via twitter, which you'd probably ignore if your r not @'d
#fun Fun stuff I find and want to share
#pol Politics (I am trying to avoid this)
#fam Family matters and events
#me About me, but not the mundane #life stuff
#blog New blog posts announced on twitter
#web The Web, Internet including social media, social networks and Twitter
#vw About virtual worlds
#soc Society, including rants about how bad/good the world is
#sci Science, if any
#kids Not yet
#dev Software development and tools
#tec Technical stuff except software development
#ovw That's the project I am currently working on most of the time
#vg My series of Virtual Goods Articles (see http://blog.wolfspelz.de/2009/10/virtual-goods-ticker.html)
A twitter client could have multiple input fields, so that I do not have to choose the microtag for each tweet. A twitter client could automatically fetch the microtags of a new follower from microtags.org and show you a list to select from. My list is at http://microtags.org/tags/?http://twitter.com/wolfspelz. Your twitter client could also fetch my microtags from time to time and offer new choices if they change.
I'd rather make these tags metadata for the tweet and not as part of the text. But since there is not metadata in microblogging, there will now be microtags in the text. Clients can strip them anyway.
_happy_microtagging()
See also: http://www.microsyntax.org but I can't wait anymore.
20. September 2008
TwiX - a Twitter to Jabber (XMPP) Gateway

Tired of waiting for Jabber device updates from Twitter.com?
Try TwiX ...
...and use your Jabber client to send and receive tweets.
TwiX polls twitter.com for new tweets and sends them to your Jabber account as instant message. It also sends your tweets to twitter.com.
Features:
- Twitter from your Jabber client
- get tweets to your Jabber client
- runs on Windows and Linux with .NET and mono
- Jabber command line + statistics
- detailed log output
- many command line options (you won't really need)
- TwiX runs well on just the 3 account parameters shown below

Release: TwiX-0.5.0.zip (Best ever)
Source code: TwiX-src-0.5.0.zip (MS Visual Studio 2008)
License: 3-clause BSD (Use it but don't sue me)
Sample command line:
% twixd -twitter my-twitter-token:my-twitter-token-secret
-xmpp my-real-jid@jabber.org
-client my-twitter-gateway@jabber.org/TwiX:gateway-password
Command line options:
Usage:
-xmpp
-help # optional: this text
Jabber command line:
/twix quit
/twix reload
/twix stats
/twix resetstats
/twix set xmppresponse <on|off>
/twix set xmppupdates <on|off>
7. Mai 2008
Twitteraktivität
Meine Twitteraktivität.
Sieht nach ausreichend Schlaf aus, aber das Mittagessen ist etwas unregelmässig.
Labels: Persönlich, Twitter