Blocking users

Jan 19, 2014 at 7:56 PM
How do you block a user with tweetinvi? (twitterer)
Jan 19, 2014 at 11:39 PM
Edited Mar 13, 2014 at 11:01 AM
Hi Ricky,

This feature was not implemented before.

Consequently I have implemented it for you in Tweetinvi
You can download Tweetinvi 0.9 in Source Code and select the Development solution. It is mature enough to allow you to use it.

Here is the example provided within Examplinvi:
var user = User.GetUserFromScreenName(userName);
Hope this help you.
Marked as answer by linvi on 1/21/2014 at 7:33 AM
Mar 13, 2014 at 3:52 AM
Is it possible to report a user for spam?
... and maybe have a list of already blocked users too?

Thanks in advance
Mar 13, 2014 at 1:20 PM
Edited Mar 13, 2014 at 1:43 PM

This method is not yet implemented but you can use the TwitterAccessor like this :
// var queryWithUserId = "";

var queryWithScreenName = "";
var spamReportedSuccessfully = TwitterAccessor.TryExecutePOSTQuery(queryWithScreenName);
Concerning user list this is a bit more complicated, here is the code you need:
public class BlockedUsersContainer
    public IEnumerable<IUserDTO> Users { get; set; }

    public IEnumerable<IUser> BlockedUsers
        get { return User.GenerateUsersFromDTO(Users); }

// Invoke the reques in your code
var blockedUsersQuery = "";
var blockedUsers = TwitterAccessor.ExecuteGETQuery<BlockedUsersContainer>(blockedUsersQuery).BlockedUsers;
I can see how the 2 posts are related but please try to open news posts if the features are different.

Marked as answer by linvi on 3/13/2014 at 6:43 AM