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

New Post: Show messages (DM) in conversation view

$
0
0
Hi,

I am not sure what you mean by streaming mentions.

If you want to get all the tweets with a specific mention I think you want to use the filteredstream:
var fs = Stream.CreateFilteredStream();
fs.AddTrack("@MENTION_USER_NAME");
fs.MatchingTweetReceived += (sender, args) =>
{
    // Mention detected!
};
fs.StartStreamMatchingAllConditions();
If you want to receive all the tweets related with your account (friends/followers...) you can use the UserStream:
var us = Stream.CreateUserStream();
us.TweetCreatedByAnyone += (sender, args) =>
{
    var mention = args.Tweet.UserMentions;
    if (mention != null)
    {
        if (mention.Any(x => x.ScreenName == "MENTION_USER_NAME"))
        {
            // The username has been detected within this tweet!
        }
    }
};
us.StartStream();
Is this of any help?
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>