Search This Blog

Monday, October 15, 2007

ASP.NET wrapper for Twitter API

I was developing a ASP.NET wrapper for Twitter API and end up using the wrapper provided by Yedda. Credit should to Yedda.

Download the wrapper from Yedda. Unzip the files and you can play around with the project.

What i do is
  1. Create a new class name TwitterWrapper in my App_Code
  2. Copy the code from Twitter.cs and paste in TwitterWrapper.cs

to twitter your message:

string xmlOutput = "";
string TwitterUserName = "username";
string TwitterPassword = "password";

string TwitterMessage = "Hello twitter";

if (TwitterUserName != "" && TwitterPassword != "")
TwitterWrapper twitter = new TwitterWrapper();
xmlOutput = twitter.Update(TwitterUserName, TwitterPassword, TwitterMessage, TwitterWrapper.OutputFormatType.XML);
catch (Exception ex)
{ }
{ }


ben said...
This comment has been removed by the author.
Nathan said...

Very nicely done!

Anonymous said...

Thanks for the example. I had some problems with the update throwing a 417 Exception failed error. Check out for a resolution.

DotNetGuts said...

gr8 stuff man...

Its a good handy code to start instantly. Good work!

DotNetGuts (DNG) said...

Hi, I have write an Twitter Programming Example, check out this one is more easy and fast as compare to solution provided by Yedda.
DotNetGuts (DNG)

In blues said...

Hey, thanks for sharing. It's a cool stuff.

Anonymous said...

Worthless for VB.Net developers... converted code from (horrid) C# and there were errors galore.

Rahul said...

is it possible to get all friends followers with this code.....

Anonymous said...

HI Can any body Give Some Sample C# To Post messages to Twiiter. I am using Yeddas Wrapper it is giving exception as "The remote server returned an error: (417) Expectation Failed."

Thanks in Advance

Anonymous said...

Простите, пожалуйста =) .