Search code examples
tweetinvi

How do I Auto Re-tweet Somebody or a Hashtag And Follow Them Using Tweetinvi


I want to make a automatic re-tweet/follow bot so I can follow and re-tweet certain people and RT a specific hashtag (#Giveaways) I am using Tweetinvi but I dont understand how to do these things I've listed.


Solution

  • I am the developer of Tweetinvi.

    You could simply do the following:

    Auth.SetUserCredentials("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET");
    
    var fs = Stream.CreateFilteredStream();
    fs.AddTrack("#fnqifqun");
    
    fs.MatchingTweetReceived += (sender, args) =>
    {
        var tweet = args.Tweet;
        tweet.PublishRetweetAsync();
    };
    
    fs.StartStreamMatchingAllConditions();
    

    Your bot is now complete!