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

loading tweets in vb

Aug 9, 2013 at 6:42 PM
Hello, I am running to an issue where i can not load any tweets. I follows the VB demo source code you proved and am using the HandleOAuthQueryDemo, but for

Dim tweets = _
            From tweet In twitterCtx.Status _
            Where tweet.Type = StatusType.Show
For Each tweet In tweets

it says that the tweet in the for each section "is not declared. it may be inaccessible due to its protect level. It is in a a private sub, just like in the example. I am fairly new to VB any help would be greatly appreiciated. I am also passing through the twitterctx, and e everything is being authorized.
Aug 9, 2013 at 11:47 PM

Not sure what's happening in your code, but here's code from one of my demos:
    Private Sub FriendsStatusQueryDemo(ByVal twitterCtx As TwitterContext)
        Dim ts = From t In twitterCtx.Status _
                 Where t.Type = StatusType.Show

        For Each tweet In ts
            Console.WriteLine("Friend: " & tweet.User.Name & Environment.NewLine & _
                              "Tweet: " & tweet.Text & Environment.NewLine)
    End Sub
This is available via the downloadable source code, in the LinqToTwitterDemosVB project.

Aug 10, 2013 at 7:27 AM
Thanks for your reply, however I have already looked at your examples and demos. The issue that seems to be arising is that the 'tweet ' in 'for each tweet in ts' seems to not load correctly because it is maybe not declared or not recognized? The error is the error that is above. I am new to vb so not sure on how to correct. Do you happen to declare 'tweet' anywhere else in the code because Unfortunately I was not able to find anything. Any more help is greatly appreciated.