Thanks for your replies, I will try to explain my question better:
My goal is to backup my friends (e.g. the people i follow) in a .cvs
I first do an API call to get all friends, like this <cfhttp
method="get" result="output" />
This works great and returns (after using 'deserializejson') an array
of all friends ID's which i append to a Java stringbuffer and write to
a .csv file.
But, what i really need are screen_name's (and not ID's),
So, i am looping over this friends ID array to get screen_name for
each ID with API calls to http://twitter.com/users/show.json
But when a someone has, for example, 3000 friends he's is following,
that means i have to do 3000 API calls, and that is the problem.
So, my question: is there a way to get a users friends screen_name's
in, say,1 API call, just like you can get 3000 ID's with 1 call?
I have not yet tried to get my IP whitelisted (just localhost at the
moment), so i have only 150 API calls/hour.
But even with a whitelisted IP i would run into ratelimit problems
because EACH id-to-screen_name conversion needs 1 API call.
Hoping that someone found a much better way for this :)
On Sep 5, 8:54 am, Michael Steuer <mste...@gmail.com> wrote:
> Do you have any code examples for this? So you basically maintain a
> local db of id-to- screen_names? Do you get all of a user's friend/
> follower id's and then look up their screen names with individual API
> calls? What do you do when a user has more relationships than the API
> limit will allow you to query? And what about users that change their
> screen name? In short, can you provide a bit more background to your
> On Sep 4, 2009, at 11:23 PM, TjL <luo...@gmail.com> wrote:
> > caching is the best answer i have found
> > On Fri, Sep 4, 2009 at 9:01 PM, dizid<glasw...@gmail.com> wrote:
> >> Hi,
> >> When i request friends (or followers) from the Twitter API i want to
> >> get the screen_name's based on the id's.
> >> I use users/show for this, inputting the id and getting back de
> >> screen_name.
> >> This costs ALOT of API calls and i run into the API rate limit fast,
> >> especially with many friends.
> >> Is there a better way of getting screen_names for friends /
> >> followers?
> >> ( Better, meaning in fewer API calls.)
> >> Thank you.