我使用此代码来获取推文并将其保存到Json文件中。 如何将其保存为单个推文(作为json对象)!因为通过这种方式所有的参数加载所有推文
// Create the Stream
var stream = Stream.CreateFilteredStream();
// Keywords to Track
stream.AddTrack("Disney");
// Limit to English
stream.AddTweetLanguageFilter(LanguageFilter.English);
// Message so you know its running
Console.WriteLine("Connected to Twitter!");
// Called when a tweet maching the tracker is produced
stream.MatchingTweetReceived += (sender, arguments) =>
{
Console.Write(arguments.Tweet.Text);
};
stream.JsonObjectReceived += (sender, arguments) =>
{
System.IO.File.WriteAllText("tweets.json", arguments.Json );
};
stream.StartStreamMatchingAllConditions();
Console.ReadKey();
}
}
}