How to add a twitter user to your follow list

by Viper 22. May 2009 05:28

This code snippet will demonstrate how you can add a twitter user to your follow list. This is called adding a user to your friends list.


static void AddToFollow(string userName)
{
 IFluentTwitter ft = FluentTwitter.CreateRequest();
 ft.AuthenticateAs(LOGIN_NAME, PASSWORD);
 ft.Friendships().Befriend(userName);
 var resp = ft.Request();
 if (null != resp)
 {
  TwitterUser user = resp.AsUser();
  if (null != user)
  {
   Console.WriteLine("User {0} added to follow list", user.ScreenName);
  }
 }
}

On successful execution of request, API returns details of the user that you added to your friend list.

 

Views: 3549

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