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.