Racing57
Racing57

Reputation: 91

Using TweetInvi FilteredStream to monitor #Tags

I have a project where I have to monitor specific #tags so that I can perform an action, I was using the tweetinvi api which was great, but when connecting to my feed, I could only follow items on my feed, I need to be able to get the specific #tag regardless of who posted it. I thought the filteredstream would work, as I could add my #tag as a track, but it still only works on my feed, if post it, it reports straight back, if my developer posts it, nothing !!?!?!

        try
        {
            var filteredStream = Tweetinvi.Stream.CreateFilteredStream();
            filteredStream.AddTrack("#myhashtag");
            filteredStream.MatchingTweetReceived += filteredStream_MatchingTweetReceived;
            filteredStream.StartStreamMatchingAllConditions();

        }
        catch (Exception excp)
        {

        }

any pointers would be much appreciated, as I am sure this is possible, and from what I am reading, I am sure this is the correct solution, as it states it is a public feed, and not a user feed.

I tried just performing a search, which works, but can take up to 20 seconds to return a result, and that is the same if you search from within Twitter.

Upvotes: 0

Views: 521

Answers (1)

user2465083
user2465083

Reputation: 595

The filter stream of twitter is a public stream.

Therefore if you post a tweet with a specific tag and receive a response from the Tweetinvi API it means that the API correctly configured the stream because it will have received the tweet not by the fact that it is your account but because it has been published as a public tweet.

The only thing that could prevent a tweet with the specific tag to be catched would be if the tweet is private.

Would you please verify that?

Upvotes: 0

Related Questions