Twitter call limits and sad faces

13 November 2012

Good news: I’ve managed to pull the last tweets of people a user is following:

ugh

Deal with it, protected friends.

Bad news: I hit some nasty call limits when I try to deal with any significant number of individuals. It’s not a big deal for my paltry ~40 friends (and I’m making a distinction between friend and follower here; the former is someone whose tweets I read, while the latter is someone who reads my tweets), but it quickly becomes a more serious issue as it scales up.

To understand why this is a problem, I need to explain. Twitter has an API call limit, which is kind of like saying that you can only ask Twitter for something a certain number of times per hour. Twitter allows up to 350 calls per hour (per user, per application), which means that you could use this app to do 350 distinct things. What Twitter considers a “thing” is where this gets annoying.

Pulling up your timeline/feed/whatever - the thing that tells you what people have been saying lately (see pic below) - is one call. timeline

But what if you want to pull all of the tweets that Bill Nye has made? That’s 1 call as well. It’s a completely separate call. bill nye

Frustratingly, that single call brings me all of this (and more) data, much of which is superfluous to my needs.

And if you have 40 people you follow? That would require 40 calls.

And if you have 200 people you follow? 200 calls.

So that’s only kind of annoying until you start coming closer to that magic number, 350. Once a user hits that, they get blocked from making any further calls with the specific app which hit that limit. They can still tweet from a web browser or their mobile device, but they have to take a break from your app.

That’s kinda bad because some friends - the ones for whom this app would be perfect, follow hundreds of people, which would trip the call limiter.

I could keep going with the current implementation I have, but there would be no point. I have a well-pruned friend list, so it wouldn’t benefit me anymore. I’ve made a discussion (which I’ve since lost…) on Twitter’s dev forum, and maybe someone will chime in with a suggestion for a different implementation. If that happens, I might as well not get entrenched in this approach.

No, I’m not depressed. But it sure feels like it.

Oh, right: sad faces. :(

If you have something to say about this post, email me or tweet at me.