Cant get more than 20 tweets

Jul 27, 2012 at 2:15 PM

Can anyone help me to get more than 20 tweets I used the parameters but anyway After the number 20th I wet the error that I'm out of the collection size. ¿Can anyone help me? I'm not an expert.

 

EXAMPLE:

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        Dim tw As New twitterAPI
        Dim Status As twitterStatus
        Dim x As String
        Dim i As Integer



        tw.AuthenticateWith("ConsumerKey","ConsumerSecret","TokenKey","TokenSecret")

        ' Specify that we want 100 statuses instead of the default 20
        Dim tp As New twitterParameters


        tp.Add(twitterParameterNames.Count, 100)
        tw.UserTimeline(tp)

        For i = 0 To 100
            If i = 0 Then
                RichTextBox1.Text = tw.UserTimeline("MichelPesquera")(i).Text
            Else
                RichTextBox1.Text = RichTextBox1.Text & vbCrLf &                        tw.UserTimeline("MichelPesquera")(i).Text
            End If
            Me.Update()
        Next
    End Sub

Jul 28, 2012 at 7:24 AM
Edited Jul 28, 2012 at 7:56 AM

The Twitter API does not allow more than 20 tweets to be returned in one API call. However, you can use the Page parameter to get a user's second, third, ..., n-page of 20 tweets. Here is a description of the library Twitterizer, which I suppose you're using, where you'll find a description of the parameter Page:

http://svn.twitterizer.net/twitterizer/branches/twitterizer1/Twiterizer.Framework/Data%20Transfer%20Objects/TwitterParameters.cs

http://svn.twitterizer.net/twitterizer/tags/release-1.0/Twiterizer.Framework/Data%20Transfer%20Objects/TwitterParameters.cs

Here is an example

http://twitterizer.googlecode.com/svn-history/r98/wiki/GettingStarted.wiki