A Fun Little Silverlight Twitter Application
My new boss Marc set us a little challenge to build a simple Silverlight kiosk type application that would display the latest Tweets for a set of given keywords. "20mins of work" according to Marc. Well, the end result may have looked like 20mins of effort but getting there took a few diversions (particularly into some threading territory I didn't really need to visit) as well as the usual bugs and Silverlight saying "Oh no, I don't think so. Maybe you want to reconsider what you think it's reasonable for me to do. I might be good but I'm not psychic" etc etc
Anyway, MikeT and I both knocked something together. I think Mike'll probably build a WPF version refactored to look semi-reasonable rather than looking like it was knocked together in 20mins.
I then modified my effort to pull the top 10 Twitter queries using the Trends service. Some of terms that come back generate no results when I query against them (I think because they're tags but I didn't look into it). So you may see some search terms appear briefly (at the top of the page) and then skip on to a different term. That's all that's happening. The app switches search terms every 20s or so. It doesn't re-query the Trends service so you'll need to refresh periodically if you want the search terms themselves to update. Otherwise it continues to refresh the latest Tweets for the original search terms.
The URL for the app is http://mikeo.co.uk/demo/twitfeed/
It's not been exhaustively tested (that's an understatement - I found a bug after I "shipped" whereby it wouldn't refresh beyond about 7 or 8 iterations, turned out my Timer was being garbage collected; that should work okay now) so if you run into any problems with it (not that there's many ways in which you can exercise it) then do let me know.
It's actually quite relaxing to watch. Obviously I'm not in control of the content that gets posted on Twitter to be prepared to see the occasional "interesting" Tweet.