crunkchitis
crunkchitis

Reputation: 738

Default value for Twitter's max_id Parameter?

Is there a default value for Twitter's newish max_id parameter?

I've tried:

https://api.twitter.com/1/statuses/user_timeline.json?screen_name=justinbieber&trim_user=true&count=200&max_id=false

https://api.twitter.com/1/statuses/user_timeline.json?screen_name=justinbieber&trim_user=true&count=200&max_id=null

https://api.twitter.com/1/statuses/user_timeline.json?screen_name=justinbieber&trim_user=true&count=200&max_id=9999999999999999999999

I just want it to return exactly what it would return if you didn't use a max_id at all:

https://api.twitter.com/1/statuses/user_timeline.json?screen_name=justinbieber&trim_user=true&count=200

Biebs is counting on you...

Upvotes: 4

Views: 924

Answers (1)

Jimmy Bosse
Jimmy Bosse

Reputation: 1404

I don't think there is a default. If you want the result as if you didn't use max_id, then don't send the max_id. It's purpose is for pagination, so if you ran

https://api.twitter.com/1/statuses/user_timeline.json?screen_name=justinbieber&trim_user=true&count=200&max_id=216942783313883136

at any time, you are going to get the same 200 results. If you only care about the most recent 200 then don't bother with it.

Upvotes: 1

Related Questions