Doubt about statuses/user_timeline in REST


Hi, I am developing a web application in which we introduce a username USERNAME and a number “X” and the application will return us the last X tweets user USERNAME.

First of all, the language that I’m using is PHP. Well, this does not happen with all users, but with many. For example “jorma16” when I ask 100 tweets from this user this is the query that generated:

I turn from json to array, I do a count of the array and returns me 98. This should return 100. What am I doing wrong? I attached the relevant part of the code.

Another user with which is the same is “Jj88” with count = 100. Can anyone help me? Thanks!

A screenshot of all my code:


Check out the documentation for statuses/user_timeline, and the count parameter in particular:

The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied

A few things you could do here:

  • request 200 tweets and discard older ones to get down to the 100 most recent

  • request 100; if less than 100 are returned, make a further request for more