Limitations of 'user_timeline' API with the 'exclude_replies' parameter


#1

We are working on an iOS app where we want to show the timeline of a user. We are only interested on the normal tweets (no replies) as you can see on the Twittter website, for example:
https://twitter.com/NS_online
This account has a few direct tweets per day and lots of replies.

The only API available to get that list of tweets seems to be the ‘statuses/user_timeline’ with the ‘exclude_replies’ parameter. But for some reason (probably performance) the replies are filtered out after retrieving the tweets. I quote from the documentation: “… the count parameter retrieves that many tweets before filtering out retweets and replies.”.

So if we call the user_timeline API with a max. of 200 tweets:
https://api.twitter.com/1.1/statuses/user_timeline.json?count=200&exclude_replies=1&include_rts=1&screen_name=NS_online
we only get a limited number of results, usually between 0 and 5. That’s because the other 195 tweets are replies.

Is there a way to get more tweets in one request?


#2

No, there’s no better way… it differs of course user-to-user depending on how many replies they issue. Over time it can be less painful when you’re using since_id and max_id and only rolling the timeline forward.