How to get list of people following you on twitter using REST API

by Viper 22. May 2009 12:14

This code sample will demonstrate how you can get list of people who are following you on twitter using Twitter REST API. The reason I mentioned "following you" because this API requires authentication. So unless you have credentials of other users, you can execute this API against the authenticated user account only.


static void GetMyFollowers()
{
 IFluentTwitter ft = FluentTwitter.CreateRequest();
 ft.AuthenticateAs(LOGIN_NAME, PASSWORD);
 ft.Users().GetFollowers().AsJson();
 var resp = ft.Request();
 if (null != resp)
 {
  var users = resp.AsUsers();
  if (null != users)
  {
   foreach (TwitterUser user in users)
   {
    Console.WriteLine("User Id: {0}, Screen Name: {1}", user.Id, user.ScreenName);
   }
  }
 }
}

Views: 1110

Tags: ,

Twitter

Comments

7/23/2009 5:45:58 PM #

Tommy Hilfiger

I don't like your template but your posts are quite good so I will check back!

Tommy Hilfiger United States

8/13/2009 7:10:41 PM #

Seiko Quartz Automatic Womens

I think you have to improve a bit the design and usability of your blog.

Seiko Quartz Automatic Womens United States

8/15/2009 4:57:25 PM #

Fossil Mens Casual Collection

Very interesting topic will bookmark your site to check if you write more about in the future.

Fossil Mens Casual Collection United States

10/19/2009 11:44:29 AM #

cash loans

thanks!  very helpful post!! like the template btw ;)

cash loans United States

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.5.1.7
Theme by Naveen Kohli