Cant get more than 20 tweets

Jul 27, 2012 at 3: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.



    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


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

        tp.Add(twitterParameterNames.Count, 100)

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

Jul 28, 2012 at 8:24 AM
Edited Jul 28, 2012 at 8: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:

Here is an example