Hello!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tweetinvi;
using TwitterStream;
namespace TwitterStream
{
If I try to get only the text, it works fine, but if I want the location, it throws me an exception: "An exception of type 'System.NullReferenceException' occurred in TwitterStream.exe but was not handled in user code".
Any help would be appreciated.
Thanks!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tweetinvi;
using TwitterStream;
namespace TwitterStream
{
class Program
{
static void Main(string[] args)
{
TwitterCredentials.SetCredentials(...);
TwitterStream();
Console.ReadLine();
}
private static void TwitterStream()
{
var stream = Stream.CreateSampleStream();
stream.TweetReceived += (sender, args) =>
{
Console.WriteLine(args.Tweet.Coordinates.Latitude);
};
stream.StartStream();
}
}
}If I try to get only the text, it works fine, but if I want the location, it throws me an exception: "An exception of type 'System.NullReferenceException' occurred in TwitterStream.exe but was not handled in user code".
Any help would be appreciated.
Thanks!