Can't read stream with "follow"

Feb 6, 2011 at 10:59 AM

Hi Joe,

I'm still hava a problem reading streams.  When I use "Track" it's work, but this query throws an invalid operation exception:

 var streaming = (from strm in ctx.UserStream
                                  where strm.Type == UserStreamType.User &&
                                  strm.Follow == "807095,34713362,624413,16334857,17622474,19546277,15110357"
                                  && strm.With == "User"
                                  select strm)
                        .StreamingCallback(strm =>
                        {
                                   strm.Content.........

Ideally, I neet to use a SiteStream, but I can't get results either.  I think it's give a "Forbidden" return (and it's not a OAuth problem).

Thanks for your help,

Marcos

Coordinator
Feb 6, 2011 at 5:19 PM

Hi Marcos,

I didn't get an InvalidOperationException with the same settings.  Do you have a stack trace and message?

The Follow filter is only applicable to the Site (UserStreamType.Site) stream, so it effectively does nothing for a User (UserStreamType.User) stream.  The User stream only applies to the user who is authenticated with OAuth.  This would be defined by the authenticator you passed to ctx.  For multiple users, you would need to have a separate TwitterContext for each user, which is cumbersome and not really the way User streams were designed for.  It really looks like you want to use a Site stream.  To use the Site Stream feature (which is currently in Beta), you'll need to contact Twitter directly and ask to be included in their Beta program; here's the Twitter Site Streams docs, which has guidance and contact info: http://dev.twitter.com/pages/site_streams.

Joe