I am trying to track some keywords with the LinqToTwitter library. When I look at the buffer, the data format is not correct.
For example, the data should look like:
{"created_at":"Thu Jul 31 04:21:25 +0000 2014","id":494699327386693632,"id_str":"494699327386693632" ...... ,"filter_level":"medium","lang":"tr"}
But the data looks like:
{"created_at":"Thu Jul 31 04:21:25 +0000 2014","id":494699327386693632,"id_str":"494699327386693632" ...... ,"filter_level":"medium","lang":"tr"} JCAAIMhJz.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/Bt18rBJCAAIMhJz.jpg"
Sample code like that (little bit different from linqtotwitter default example):
await
(from strm in TwitterCtx.Streaming
where strm.Type == StreamingType.Filter &&
strm.Track == Track
select strm)
.StartAsync(async strm =>
{
if (!String.IsNullOrEmpty(strm.Content))
buffer += strm.Content;
else
{
if (!String.IsNullOrEmpty(buffer))
{
streamContentList.Add(buffer);
buffer = String.Empty;
count++;
}
}
if (count >= QueryBoundary)
{
Task.Factory.StartNew(() => { mongoAnalyzeUpdateQueryMethod(MongoDB, MongoKeyName, (long)count); });
count = 0;
streamContentList = new List<string>();
}
Console.WriteLine(count);
});
I think I broke the data order when I tried to control content. What should I do resolve that problem?
This problem fixed in the latest version on LINQ to Twitter, v3.0.4. [1]