How to add a twitter user to your follow list

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.

comments powered by Disqus

Search

Social

Weather

Monthly Posts