Hi all!
I'm very new to programming and would really appreciate some help.
I'm having some problem in collecting the json from the Tweetinvi real-time stream.
These are my current code.
namespace TweetinviSTREAM
{
I'm very new to programming and would really appreciate some help.
I'm having some problem in collecting the json from the Tweetinvi real-time stream.
These are my current code.
namespace TweetinviSTREAM
{
class Program
{
static void Main(string[] args)
{
string Consumer = "removed";
string ConsumerSecret = "removed";
string AccessToken = "removed";
string AccessTokenSecret = "removed";
TwitterCredentials.SetCredentials(AccessToken, AccessTokenSecret, Consumer, ConsumerSecret);
try
{
TwitterStream() ;
Json_GetJsonForSavedSearchRequestExample();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
Console.ReadLine();
}
private static void TwitterStream()
{
var stream = Tweetinvi.Stream.CreateSampleStream();
stream.TweetReceived += (sender, args) =>
{
Console.WriteLine(args.Tweet.Text);
};
stream.StartStream();
Console.WriteLine("Stream State: " + stream.StreamState.ToString());
}
private static void Json_GetJsonForSavedSearchRequestExample()
{
var jsonResponse = SavedSearchJson.GetSavedSearches();
Console.WriteLine(jsonResponse);
}
}
}