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: 3906

Tags: ,

Twitter

blog comments powered by Disqus

Smart Phones Poll

What smart phone do you currently own?





Show Results

Month List

Powered by BlogEngine.NET 2.0.0.49
Theme by Naveen Kohli