public Tweep CreateFriendship(Tweep follow, string screenname = null) { if (string.IsNullOrEmpty(screenname)) { screenname = UsersCollection.PrimaryUser().TwitterScreenName; } var user = GetAuthorizedTwitterContext(screenname).CreateFriendship(follow.User.Identifier.UserID, null, true); return(new Tweep(user, user.Following ? Tweep.TweepType.Following : Tweep.TweepType.None)); }
public Tweep CreateFriendship(Tweep follow, string screenname = null) { if (string.IsNullOrEmpty(screenname)) { screenname = PrimaryUser.TwitterScreenName; } var createFriendshipTask = GetAuthorizedTwitterContext(screenname).CreateFriendshipAsync(follow.User.UserID, true); createFriendshipTask.Wait(); var user = createFriendshipTask.Result; return(new Tweep(user, user.Following ? Tweep.TweepType.Following : Tweep.TweepType.None)); }