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

New Post: Filtered Stream if he/she follow and i follow him/her

$
0
0
Maybe you want to use the UserStream:
var followerIds = new HashSet<long>(User.GetFollowerIds("me"));
var us = Stream.CreateUserStream();
us.TweetCreatedByAnyoneButMe += (sender, args) =>
{
    var tweet = args.Tweet;
    var creator = tweet.Creator;
    var creatorId = creator.Id;

    if (followerIds.Contains(creatorId))
    {
        // My code
    }
};

us.FollowedByUser += (sender, args) =>
{
    Console.WriteLine("Mr {0} is now following you!", args.User.ScreenName);
};
us.StartStream();
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>