Receiving partial messages from filtered stream

Jan 24, 2014 at 9:12 PM
Hi guys,

I'm trying to receive statuses from the filtered stream and i am using the example form the documentation. Here is the code i'm using:
    class Program
        static void Main(string[] args)
                Task demoTask = DoDemosAsync();
        static async Task DoDemosAsync()
            var auth = new SingleUserAuthorizer
                CredentialStore = new SingleUserInMemoryCredentialStore
                    ConsumerKey = ConfigurationManager.AppSettings["consumerKey"],
                    ConsumerSecret = ConfigurationManager.AppSettings["consumerSecret"],
                    AccessToken = ConfigurationManager.AppSettings["accessToken"],
                    AccessTokenSecret = ConfigurationManager.AppSettings["accessTokenSecret"]
            await auth.AuthorizeAsync();
            var twitterCtx = new TwitterContext(auth);
            await DoFilterStreamAsync(twitterCtx);
        static private async Task DoFilterStreamAsync(TwitterContext twitterCtx)
            Console.WriteLine("\nStreamed Content: \n");
            int count = 0;

                (from strm in twitterCtx.Streaming
                 where strm.Type == StreamingType.Filter &&
                       strm.Track == "twitter"
                 select strm)
                .StartAsync(async strm =>
                    System.Diagnostics.Debug.WriteLine(strm.Content + "\n");
                    if (count++ >= 5)
When using this the first status i receive is perfectly fine (valid). However the following statuses are only received partially. For example the first status starts at the beginning of the json:
{"created_at": .... ,"lang":"en"}
but the next one will start at a random spot like:
y_to_status_id":null, ... ,"lang":"en"}
All the status updates do end at the end of the json. I've tried using a couple of versions of linqtotwitter ( 3.0.0, 3.0.1 and the latest pre release one from nuget) but no luck there. (I haven't tried 2.x yet.) I'm using VS 2012 on Win 8.1.

Am i missing something? Has anyone else had trouble with this?
Thanks in advance!
Jan 24, 2014 at 9:45 PM

I recently checked in some fixes to recent problems with the stream. I'm planning another release before too long, but you're welcome to download the source code and compile any time before then.

Jan 24, 2014 at 11:07 PM
I can confirm that building form the latest source fixes my problem, thanks!
Jan 25, 2014 at 8:41 PM
wieweet, Thanks for confirming.