This project has moved and is read-only. For the latest updates, please go here.

Streaming Support

Oct 17, 2010 at 6:46 AM

Today, I checked in the first bit of streaming support for LINQ to Twitter.  There are various types of streams:

  • Filter: Allows you to specify critera (aka streaming search)
  • Firehose: All tweets
  • Links: Any tweets with links
  • Retweet: All retweets
  • Sample:  A random (as defined by Twitter) sample of tweets

Issues are open to add all of these stream types.  However, this first bit supported Sample streams, which you can check out and download here:


Dec 15, 2010 at 7:15 PM
Edited Dec 15, 2010 at 10:24 PM

Hi Joe,

I have tried streaming demo for public timeline and it throws following error

The request was aborted: The connection was closed unexpectedly.

Can you elaborate more about this .


UserStream is working file. how can store strm.Content into multiple table like tweet, users etc



Dec 16, 2010 at 2:05 AM

Hi Shahid,

LINQ to Twitter has a back-off strategy that is similar to that prescribed by Twitter Streaming Connecting docs.  What you're seeing might be related to the same bug you reported yesterday.  BTW, you can use the Log property, on TwitterContext, which works similar to the LINQ to SQL DataContext.  LINQ to Twitter writes exceptions to Log.

Currently LINQ to Twitter returns stream data in JSON strings.  Right now, you'll have to write code that looks at the JSON message. I'm considering future enhancements for automatically serializing to objects or a combination of raw stream and serialized objects.