Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: How do I get 10k+ tweets streams in few minutes

$
0
0
Hi,

When I did these tests, I had to take very popular keywords. Usually look into the news to get these kind of keywords.
Now if you want to analyze 2 tracks you can use the following.
var stream = Stream.CreateFilteredStream();
stream.AddTrack("MacDonald");
stream.AddTrack("KFC");
stream.MatchingTweetReceived += (sender, args) =>
{
    if (args.MatchingTracks.Contains("MacDonald"))
    {
        // Code logic for mac do
    }

    if (args.MatchingTracks.Contains("KFC"))
    {
        // Code logic for KFC
    }

    // Please not that I do not use else because both Keywords can be found in a tweet
};

stream.StartStreamMatchingAllConditions();
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles