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

Listing Friends

Gets IDs of people being followed by the user.

Entity: Friendship
Type: FriendshipType..FriendsIDs
Parameters/Filters:
Name Purpose Type Required
Count Number of IDs to return int no
Cursor Separates results into pages long no
ScreenName Screen name of user string only if UserID is empty
UserID ID of user string only if ScreenName is empty

v3.0 Example:
            var friendList =
                await
                (from friend in twitterCtx.Friendship
                 where friend.Type == FriendshipType.FriendIDs &&
                       friend.ScreenName == "JoeMayo"
                 select friend)
                .SingleOrDefaultAsync();

            if (friendList != null &&
                friendList.IDInfo != null &&
                friendList.IDInfo.IDs != null)
            {
                friendList.IDInfo.IDs.ForEach(id =>
                    Console.WriteLine("Follower ID: " + id));
            }
v2.1 Example:
            var friendList =
                (from friend in twitterCtx.SocialGraph
                 where friend.Type == SocialGraphType.Friends &&
                       friend.ScreenName == "JoeMayo"
                 select friend)
                 .SingleOrDefault();

            foreach (var id in friendList.IDs)
            {
                Console.WriteLine("Friend ID: " + id);
            }

Twitter API: friends/ids

Last edited Nov 29, 2013 at 3:48 AM by JoeMayo, version 14