11 May 2012

Twitter API: The problem with followers[friends]/id and users/lookup

Twitter is doing a little API housekeeping and come 14th* (May, 2012) the changes will take effect and they plan on pulling the plugs on deprecated methods. I have gone through the changes and compared the deprecated API with new ones to see where it affects Twhii. As a client for low end java devices, there is a little hit here and there but it's not that bad. For example, I've had to remove public timeline but then who really cares that much about public timelines anyway. But beyond Twhii, I have noticed that the deprecation of statuses/followers (and statuses/friends) for the combination of followers[friends]/id and users/lookup has some downsides. 

1. The follow order

Statuses/followers[friends] return list of followers or friends in the order they follow or are followed by an account. When I check my followers, I want to know the people that just followed me since last check. followers/id + users/lookup don't return in that order. Really, I don't even know in what order the ids are returned.

2. The number of returned values

Statuses/followers[friends] return about 100 results at a time and you can use the cursor parameter to paginate. followers/id + users/lookup return up to 5000 ids at a time. It may be well argued that the size of user profile returned by statuses' 100 results and id's 5000 will be of just slight difference but the data size is not the argument. Retrieving 5000 ids at once leaves the client the headache of having to split this into seperate chunks to retrieve user profiles because users/lookup only supports just 100 ids per request. The API team will sure have their reasons for returning ids as large as 5000 and I'm not disputing that. I just think a parameter (say count) should be available to limit the number of returned ids.

I really hope the API team will look into this.

 

* according to updates to the blogpost, due to feedbacks, none of the currently scheduled changes will take effect on May 14th, 2012

 

Looking for a simple marketing automation tool to automate your customer onboarding, retention and lifecycle emails? Check out Engage and signup for free.

 

My name is Opeyemi Obembe. I build things for web and mobile and write about my experiments. Follow me on Twitter—@kehers.

 

Next post: The minimalistic editor