I'm using TweetInvi Streaming API to watch my twitter timeline and send me a mail everytime someone tweet with the word "AREA2017";
This is where i'am so far:
Auth.SetUserCredentials("consumerkey", "consumersecret", "accesstoken", "accesstokensecret");
var user = Tweetinvi.User.GetAuthenticatedUser();
var stream = Stream.CreateFilteredStream();
stream.AddTrack("AREA2017");
stream.MatchingTweetReceived += (sender, arguments) =>
{
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.Port = 25;
client.Credentials = new NetworkCredential("somemail@gmail.com", "mygmailpassword");
client.EnableSsl = true;
client.Send(new MailMessage("somemail2@gmail.com", "somemail2@gmail.com", "Hi !", "body"));
Console.WriteLine(arguments.Tweet.Text);
};
stream.StartStreamMatchingAllConditions();
So, i don't have much idea why it's not working, i follow this tutorial: https://www.youtube.com/watch?v=e-lJm-bqyI0 +
I check to send me a mail with my code and it's working well, the api just don't find any tweet containing "AREA2017".