I'm finding a bizarre problem. I'm building a unix console app to
interface with the API, and update twinfluence.com user profiles from
unix calls. This requires many consecutive calls to the /statuses/
followers/ command for twitterers with many followers.
Everything works fine... but somewhere after 120 or so consecutive
calls, I start getting empty array results incorrectly. My app is
working fine, and in fact the exit codes (I'm using CURL) say that the
twitter API said everything worked OK. For example, here is a verbose
dump of an API call that shows green lights, but an empty array:
---------------------------------------------------------------------------------------------------------------------------
* About to connect() to twitter.com port 80 (#0)
* Trying 128.121.146.100... connected
* Connected to twitter.com (128.121.146.100) port 80 (#0)
* Server auth using Basic with user 'twinfluence'
> GET /statuses/followers/mrskutcher.xml?page=148 HTTP/1.1
> Authorization: Basic dHdpbmZsdWVuY2U6c25hZmVhdGhlcnM3
> User-Agent: curl/7.19.2 (x86_64-unknown-linux-gnu) libcurl/7.19.2
> OpenSSL/0.9.8i zlib/1.2.1.2 libidn/0.5.6
> Host: twitter.com
> Accept: */*
>
% Total % Received % Xferd Average Speed Time Time
Time Current
Dload Upload Total Spent
Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01
--:--:-- 0< HTTP/1.1 200 OK
< Date: Thu, 26 Mar 2009 19:43:41 GMT
< Server: hi
< Last-Modified: Thu, 26 Mar 2009 19:43:43 GMT
< Status: 200 OK
< ETag: "c1bdb255ef71e687f6f829eff2c1cc75"
< Pragma: no-cache
< Cache-Control: no-cache, no-store, must-revalidate, pre-check=0,
post-check=0
< Content-Type: application/xml; charset=utf-8
< Content-Length: 69
< Expires: Tue, 31 Mar 1981 05:00:00 GMT
< X-Revision: 7d79671371bb125ff460c697236242e167ab40af
< X-Transaction: 1238096623-20917-9010
< Set-Cookie: lang=en; path=/
< Set-Cookie: lang=en; path=/
< Set-Cookie: _twitter_sess=BAh7CToJdXNlcmkD1AD
%252FOhNwYXNzd29yZF90b2tlbiItNWZhYWViNjU4ZGQ3%250AMDUyZTE0Yjg1ZmZmZGI0YjZiYTMxY2I3MjM1MToHaWQiJTliYTcyYjdjNTUz
%250AMjVjOTc1ODMyNzlkMDRkNGJkNGQ2IgpmbGFzaElDOidBY3Rpb25Db250cm9s
%250AbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--
e3295ab3f91962241e993b5b845adcf5c0dbea30; domain=.twitter.com; path=/
< Vary: Accept-Encoding
< Connection: close
<
{ [data not shown]
0 69 0 69 0 0 46 0 --:--:-- 0:00:01
--:--:-- 159* Closing connection #0
<?xml version="1.0" encoding="UTF-8"?>
<users type="array">
</users>
---------------------------------------------------------------------------------------------------------------------------
However, if you do a direct API call to that same URL () you will find
it returns an array of 100 results. This isn't a random "oops, no
results" accidental API reply; ALL CONSECUTIVE API CALLS to /statuses/
followers for this user will continue to return empty arrays.
Does anybody have any clues for me? Is this a bug in the API? Is the
API keeping count and refusing to cooperate because it thinks I should
be using the social graph API calls instead (sorry, that won't work
for me)?
Thanks