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);
}
}
}
}