This project has moved. For the latest updates, please go here.

Creating a Friendship

Follow another user.
Signature:
public async Task<User> CreateFriendshipAsync(
    ulong userID, bool follow)
public async Task<User> CreateFriendshipAsync(
    string screenName, bool follow)
Parameters/Filters:
Name Purpose Type Required
follow Receive notifications about followed user bool no
screenName Screen name of user to follow string yes
userID ID of user to follow ulong yes


Return Type: User
v3.0 Example:
            var user = await twitterCtx.CreateFriendshipAsync("JoeMayo", true);

            if (user != null && user.Status != null)
                Console.WriteLine(
                    "User Name: {0}, Status: {1}",
                    user.Name,
                    user.Status.Text);
v2.1 Example:
var user = twitterCtx.CreateFriendship("JoeMayo", null, true);

Console.WriteLine(
    "User Name: {0}, Status: {1}",
    user.Name,
    user.Status.Text);

Twitter API: friendships/create

Last edited Nov 29, 2013 at 2:41 AM by JoeMayo, version 15