0

I'm trying to build a desktop twitter application.

I've got the oauth thing down, and can post status' no problems.

I'm not trying to retrieve a users home timeline but am having no such luck.

Any help is greatly appreciated. Here's my code:

    Dim tokens As New OAuthTokens
    tokens.AccessToken = requestToken2.Token
    tokens.AccessTokenSecret = requestToken2.TokenSecret
    tokens.ConsumerKey = consumerKey
    tokens.ConsumerSecret = consumerSecret

    Dim lastStatusID As Decimal = 123456

    Dim properties As New TimelineOptions()
    properties.UseSSL = True
    properties.SinceStatusId = lastStatusID

    Dim hometimeline As TwitterResponse(Of TwitterStatusCollection) = TwitterTimeline.HomeTimeline(tokens, properties)

    Dim tweet As String

    For Each tweet In hometimeline

    Next
Mark
  • 3,231
  • 3
  • 32
  • 57
MWild
  • 1
  • 2
  • 4

1 Answers1

0

TwitterTimeline.HomeTimeline returns a TwitterResponse. this TwitterResposen contains a property ResponseObject, which contains the tweets you want. The ResponseObject is a collection of TwitterStatus objects, which contain the property Text, which is the status' text.

Your code should like something like this:

Dim hometimeline As TwitterResponse(Of TwitterStatusCollection) = TwitterTimeline.HomeTimeline(tokens, properties)

Dim tweet As TwitterStatus

For Each tweet In hometimeline.ResponseObject

Console.Writeline(tweet.Text)

Next

PS. I'm not familiair with the VB syntax, so please correct me if I'm wrong.

user1797792
  • 1,169
  • 10
  • 26