About author  I am MCPD certified in .NET and working on .NET technologies for past 3yrs. I am very passionate about the new features which get introduced in the technology. I am here to share the new features i get to know in the world of Microsoft. Follow me on twitter @ankygoyal LinkedIN@Ankit Goyal Read more from this author


twitter
This post will throw a light on how we can update our status on Twitter from an asp.net application.

The task is pretty simple as we have libraries already available on the net.

I will be using twitterizer dll to perform the task.

The following are the steps to be followed:

  1. Download the twitterizer dll from here.
  2. Add the reference to the dll in your asp.net web application.
  3. Write the code. For example
    Twitter t = new Twitter(UserName, Password);
    t.Status.Update(UpdateString);

Following are the methods and the capabilities provided by these methods which are present in the library:

User Methods

  1. Followers
  2. Friends
  3. Follow User

Status Methods

  1. User Timeline
  2. Public Timeline
  3. Friends Timeline
  4. Show
  5. Update
  6. Destroy
  7. Replies

Direct Messages

  1. Sent To User
  2. Sent From User
  3. New Direct Message

References: Twitteriser Home Page

kick it on DotNetKicks.com

Shout it

pimp it

5 Responses to Twitter from ASP.NET Application


  1. sunnyNo Gravatar
    May 31, 2011

    This code is not working for me. However i have already download the twitterizer dll(2.3.2.0) and pass the reference in my application. But still not working for me.

    I want to get all the emails of my friends from my application.

    Could you please suggest me little bit ? I shall be very thankful to you for this.


  2. balajiNo Gravatar
    Aug 23, 2011

    Hi

    every one fllowing code is working xxxxxxxx.xml is web sit name its like
    http://www.google.com that xml file is google.xml

    String xml = wc.DownloadString(“http://twitter.com/statuses/user_timeline/XXXXXXXX.xml?count=2″);

    DataSet ds = new DataSet();

    ds.ReadXml(new StringReader(xml));

    if (ds.Tables["status"] != null && ds.Tables["user"]!=null)
    {
    Response.Write(ds.Tables["status"].Rows[0]["created_at"].ToString()+” “);
    Response.Write(ds.Tables["user"].Rows[0]["name"].ToString() + “”);
    Response.Write(ds.Tables["status"].Rows[0]["text"].ToString() + “”);

    Response.Write(ds.Tables["user"].Rows[0]["description"].ToString() + “”);

    }

Trackbacks/Pingbacks

  1. DotNetShoutout
  2. DotNetBurner - ASP.net
  3. PimpThisBlog.com

Leave a Reply