Twitter from the command line.
I’ve been playing around with a open source .Net Twitter project appropriately named TwitterVB. It’s a .Net library that you import into your .Net application and start sending status updates, pull twitter mentions, trending topics… just about anything you’d want to do with Twitter.
TwitterVB is one of the better libraries compared to others listed on the Twitter API Wiki page: http://apiwiki.twitter.com/Libraries
Note: Because it’s .Net, you can bring this library into any .Net language. I built a quick command line app in C#.
Example code:
static void Main(string[] args)
{
var tw = new TwitterVB2.TwitterAPI();
tw.AuthenticateAs(“twitteraccount”, “twitterpassword”);
string text = “”;
while (!text.Equals(“x”))
{
Console.Clear();
Console.Write(“Send Tweet: “);
text = Console.ReadLine().ToString();
if(!text.Equals(“x”)){
tw.Update(text);
Console.WriteLine(“Tweet Sent – Enter to continue”);
Console.ReadLine();
}
}
}




Great work on the app, Shoo! Someday I bet they’ll have it so you can actually send tweets from a web site. Now that would be state of the art, huh?
Thanks for blogging about TwitterVB! I’m glad to hear that you like it.
–Duane