Welcome to the official home of Twitterizer, the .NET library designed for quick and easy Twitter integration. This project has mostly been developed by one dude in his spare time, with a few others coming and going leaving their mark and moving on. It’s a pretty typical open source project: incomplete, terribly documented, but well supported.

If you’re brand new to using the Twitter API, you should download the sample application from the downloads page. It’s not included in every release, so just get the most recent available. It is a simple ASP.NET application that will walk you through the OAuth authorization process and attempt to explain what’s going on and how you can do the same in your application.

Code Examples

Get a user’s details

OAuthTokens tokens = new OAuthTokens();
tokens.AccessToken = "XXX";
tokens.AccessTokenSecret = "XXX";
tokens.ConsumerKey = "XXX";
tokens.ConsumerSecret = "XXX";
 
TwitterResponse<TwitterUser> showUserResponse = TwitterUser.Show(tokens, "twit_er_izer");
if (showUserResponse.Result == RequestResult.Success)
{
    DisplayUserDetails(showUserResponse.ResponseObject);
}
else
{
    DisplayError(showUserResponse.ErrorMessage);
}



Post an update

OAuthTokens tokens = new OAuthTokens();
tokens.AccessToken = "XXX";
tokens.AccessTokenSecret = "XXX";
tokens.ConsumerKey = "XXX";
tokens.ConsumerSecret = "XXX";
 
TwitterResponse<TwitterStatus> tweetResponse = TwitterStatus.Update(tokens, "Hello, #Twitterizer");
if (tweetResponse.Result == RequestResult.Success)
{
    // Tweet posted successfully!
}
else
{
    // Something bad happened
}
 

Comments are closed.