Streaming API and Hashtags

Jul 12, 2011 at 8:17 PM


Does LINQ to Twitter support tracking hashtags when invoking the streaming api?

I am using the following code snippet to test this out, but I am not getting any results back.

                int count = 0;
                using (var twitterCtx = new TwitterContext(auth, """"))
                    twitterCtx.StreamingUserName = "username";
                    twitterCtx.StreamingPassword = "password";
                    var streaming =
                        (from strm in twitterCtx.Streaming
                         where strm.Type == StreamingType.Filter &&
                               strm.Track == "#winning"
                         select strm)
                        .StreamingCallback(strm =>
                            Console.WriteLine(strm.Content + "\n");
                            if (count++ >= 1)
Jul 12, 2011 at 8:49 PM

Hi darkjedi,

I noticed that you set your count condition in the callback to 1.  That will result in writing the first response and then closing the stream.  Maybe change 1 to a higher number? BTW, hashtags are working for me.


Jul 13, 2011 at 3:29 PM

Yeah, I downloaded the latest version of the source code and that worked now - it didn't work in the previous version. Thanks!