Streaming data parameters

Mar 13, 2014 at 4:44 PM
Hi,

I'm trying to open a Twitter stream for a keyword using VB.NET. I've converted the code from the C# demo where it works perfectly, but when I try to run the code in VB.NET I get the following error:

You must specify at least one of the parameters Follow, Locations, or Track.

This does not entirely made sense as I specified the "Track" term in my Linq statement (using "Beer" as a search term because beer is always being talked about). I've put my streaming code below. All that happens outside this segment is my authentication and the creation of the TwitterContext variable.

Please advise whether I'm missing something?

Thanks!
    Dim myLinkObj = From strm In twitterCtx.Streaming Where strm.Type = StreamingType.Filter And strm.Track = "beer" Select strm

    Await (myLinkObj).StartAsync(Async Function(strm)
                                     Console.WriteLine(iCount)

                                     If iCount > 5000 Then
                                         strm.CloseStream()
                                     End If

                                 End Function)
May 2, 2014 at 10:06 PM
I'm getting the same error as you. I can't figure out what's wrong with my code.
        Dim twitterCtx = New TwitterContext(auth)
        Dim count As Integer = 0
        Dim queryObject = From strm In twitterCtx.Streaming Where strm.Type = StreamingType.Filter And strm.Track = "twitter"

        Await StartAsync(queryObject, _
            Function(strm)
                Console.WriteLine(strm.Content + vbLf)
                If System.Math.Max(System.Threading.Interlocked.Increment(count), count - 1) >= 5 Then
                    strm.CloseStream()
                End If
                Return Nothing
            End Function)
Coordinator
May 3, 2014 at 4:26 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
May 3, 2014 at 4:28 AM
I'm not sure what's going on with this. I though I had resolved all the VB issues, but maybe this is a new situation I haven't seen yet. I copied it as a work item to take a look.

@JoeMayo