Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Getting raw json from streamed tweets

$
0
0
Hi there,

I have studied a bit more your request and come up with a solution.

Just to give you some news. I have slightly modified the design of 0.9 and it is now able to get json from any query performed on Twitter (not all the queries are implemented but the design is).

Concerning your issue which is more focused on stream. Here are the different steps you can follow to do store the Json from any Stream<Tweet> in tweetinvi (0.8.3.21).
  • Download the source code of Tweetinvi
Update Tweet class
  • Go in Tweetinvi > Tweet.cs
  • Add a field string RawJson { get; set; }
Update SimpleStream
  • Go in Streaminvi > SimpleStream.cs
  • Line 93 after (ITweet t = new Tweet(jsonTweet);)
  • Add : t.RawJson = x;
Update FilteredStream
  • Go in Streaminvi > FilteredStream.cs
  • Line 283 replace : 'return new Tweet(tweetObject);' by
  • 'var t = new Tweet(tweetObject);
    t.RawJson = jsonTweet;'
With these few modification you will now be able to access the RawJson of your Tweet.

I hope this is temporary solution for you until the release of version 0.9.0.0.

Kind Regards,
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>