What is the best Twitter API wrapper/library for .NET?
.NetApiTwitter.Net Problem Overview
I'm looking for a way to programatically generate a twitter feed for a .NET application. Any recommendations as to a good wrapper for the twitter api to ease the work?
Boaz
.Net Solutions
Solution 1 - .Net
Microsoft.Owin.Security.Twitter for authentication + custom C# code with HttpClient and Json.NET
Something like:
using (var client = new HttpClient())
{
client.BaseAddress = new Uri("https://api.twitter.com/1.1/");
client.DefaultRequestHeaders.Authorization = authValue;
var response = await client.GetAsync("search/tweets.json");
if (response.IsSuccessStatusCode)
{
var json = await response.Content.ReadAsStringAsync();
var tweets = JsonConvert.DeserializeObject<Tweets>(json);
}
}
Good read:
- Extending HttpClient with OAuth to Access Twitter (Feb, 2012)
- Calling a Web API From a .NET Client (C#)
- Official documentation: OAuth API, REST API, Streaming API
Solution 2 - .Net
TweetSharp looks like it should be a decent option as well.
Solution 3 - .Net
there is a linq to twitter project on codeplex:
http://www.codeplex.com/LinqToTwitter
Besides the Yedda library, you can read Pedro Santos' blog on his experience.
Solution 4 - .Net
Here is a list of all the libraries listed on twitter's website.
Here is a link to Twitter's REST API documentation.
Here is a link to Twitters Streaming API documentation
Solution 5 - .Net
You'll find an updated list of .NET Twitter libraries on Twitter's developer site:
Twitter Developers: Twitter Libraries (for .NET)
-
DotNetOpenAuth by Andrew Arnott – an OpenID, OAuth and InfoCard library
-
Hammock by Daniel Crena – an HTTP API client supporting OAuth authentication.
-
LINQ to Twitter by Joe Mayo – a LINQ provider for the Twitter API
-
OAuth-Dot-Net by Chris – an OAuth library for clients and providers
-
TweetSharp by Daniel Crenna & Jason Diller – a Twitter API library built with Hammock
-
Twitterizer by DigitallyBorn – a Twitter API library (requires .NET > 3.5)
-
TwitterVB by Duane Roelands – a VB.NET Twitter API library
Solution 6 - .Net
All good answers, LinqToTwitter good. Also check out my post explaining the basics of using the Twitter API from C#/LINQ, including being aware of rate limits. (Which is important to understand).
http://stuff.seans.com/2009/04/04/a-simple-net-twitter-api-wrapper-using-linq/
Coming soon - a version of my code that automatically adjusts request speed to your rate limit. (Which is either 100/hr by default, or 20,000/hr if you or your site is "white listed").
Solution 7 - .Net
Twitterizer looks like it may be worth a look - it's even open source now... http://www.twitterizer.net/