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

New Post: How to run a code when a given user tweets something?

$
0
0
Hi there,

If you download the source code, you will find a project named Examplinvi.
In this project you will have an example for all the functions provided within the API.

In your case, you want to use the UserStream.
IToken token = new Token("xxx", "xxx", "xxx", "xxx"); // Set your credentials here.
IUserStream us = new UserStream();
us.TweetCreatedByAnyone += (sender, args) =>
{
    Console.WriteLine("Tweet '{0}' created!", args.Value.Text);
};
us.StartStream(token);
This piece of code will write in the console the text of all the tweets created by a user that is related to you.

Hope this helps you.
Kind Regards,
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>