Im using tweetinvi in c# to get stream of tweets for analysis , is there a way i can get real-Time or live filtered tweets
Asked
Active
Viewed 1,147 times
1 Answers
1
I am the developer of Tweetinvi. I am not sure if yoiur read the Filtered Stream documentation.
But here is how you can do what you want in few lines:
var stream = Stream.CreateFilteredStream();
// Add all your filters with AddTrack
stream.AddTrack("tweetinvi");
stream.AddTrack("rest");
stream.MatchingTweetReceived += (sender, args) =>
{
// This event will be invoked every time a tweet created is matching your criteria
var tweet = args.Tweet;
// If you want to get all the matching values
var matchingTracks = args.MatchingTracks;
var matchingFollowers = args.MatchingFollowers;
var matchingLocations = args.MatchingLocations;
// If you want to know which criteria has matched
var matchedOn = args.MatchOn;
};
stream.StartStreamMatchingAllConditions();

Linvi
- 2,077
- 1
- 14
- 28