tweetsharp: A .NET Twitter Library

I’ve been diving into the world of .NET development a little more these days and decided to further my leaning some by playing around with the Twitter API. In looking around the net I came across a cool Twitter library for .NET named tweetsharp. It appears to be a fairly new project, so the documentation is a bit lackluster at the moment. I put together a quick page that calls one of the tweetsharp methods to return a list of tweets from my friend’s timeline.

For those of you new to .NET, once you download the library and uncompress the files you will see two .DLL files. Copy these over to your Bin directory of your website. This will allow you to import this library and use it throughout your website or application. One file contains the base tweetsharp library and the other is a helper library for JSON. The data that is returned from the tweetsharp library can be returned in many formats, so if you plan on using the JSON data you will need to include the helper library.

Below is the code for the code behind page, which contains the guts of the logic. Notice the import calls to the tweetsharp files in the top half of the code. The rest of the code is fairly short. I call the tweetsharp library and set up my return data variables. I then bind the data to a ListView control.

<code lang="csharp[lines]">using System;<br></br>
using System.Collections.Generic;<br></br>
using System.Linq;<br></br>
using System.Web;<br></br>
using System.Web.UI;<br></br>
using System.Web.UI.WebControls;<br></br>
using System.Threading;<br></br>
using Dimebrain.TweetSharp.Fluent;<br></br>
using System.Xml;<br></br>
using System.Xml.Linq;<br></br>
using Dimebrain.TweetSharp.Model;<br></br>
using Dimebrain.TweetSharp.Extensions;