Search code examples
vb.nettwitterizer

Twitterizer - TwitterStatusCollectionResponse ResponseObject nothing


I am trying to get the timeline of my user account so I can post the tweets on our website. However, the TwitterStatusCollectionResponse ResponseObject is always nothing. The Content property has what looks to be a valid json response. The Result property is "Unknown". Here is my code:

Dim tokens As New OAuthTokens()
    tokens.AccessToken = "XX"
    tokens.AccessTokenSecret = "XX"
    tokens.ConsumerKey = "XX"
    tokens.ConsumerSecret = "XX"

    Dim options As New SearchOptions()
    options.PageNumber = 2
    options.NumberPerPage = 2

    Dim timelineOptions As New TimelineOptions
    timelineOptions.IncludeRetweets = False
    timelineOptions.Count = 5


    Dim statusCollectionResponse As TwitterResponse(Of TwitterStatusCollection) = TwitterTimeline.HomeTimeline(tokens, timelineOptions)
'this next line errors.....
    For Each status In statusCollectionResponse.ResponseObject

    next

Solution

  • Bet you got this version with nuget? There have been problems with twitterizer via nuget for a while, mostly due to incompatible json.net versions. I bet if you need it now you can get an older json.net and fix the issue for now.