> a) I would still need to use a large number of api calls just to build
> the initial list

Yeah, you have no choice. Even Twitter just fetches from the recent
500 followers only for autocompleting usernames. You can build your
list slowly as background tasks once the user has authenticated you so
that the next time the user comes to your site, all the usernames
would be available.

> b) it requires new followers to appear on the first api call. Whilst
> this happens at the moment, it might not in the future.

Where did you get the info from regarding it might not happen in the
future? As far as I know, their persistence is such that new ids are
returned first, so you don't have to worry about this for a long time.

> c) the api won't tell me people you have recently unfollowed
Yeah, it won't. You can get the delta by retrieving all the friends
and followers.

> d) I'd need to check for updates on a server side for each user on a
> frequent basis

Not really frequent, most of your users won't really be gaining any
significant number of followers in a single day. You can run the
updates whenever they login. Instead of running a background job (if
it doesn't seem feasible for many users), you can just run the updates
whenever they login.

-Nischal



On Oct 1, 3:34 pm, artesea <ryancul...@gmail.com> wrote:
> The problem with that method is that
> a) I would still need to use a large number of api calls just to build
> the initial list
> b) it requires new followers to appear on the first api call. Whilst
> this happens at the moment, it might not in the future.
> c) the api won't tell me people you have recently unfollowed
> d) I'd need to check for updates on a server side for each user on a
> frequent basis
>
> if it was just for me, I'd be happy with this method (check once a
> day, not many changes). but for 000s of users it gets time consuming.
>
> On Sep 30, 1:24 pm, nischalshetty <nischalshett...@gmail.com> wrote:
>
> > There's no way right now to get usernames in bulk. Get the ids, then
> > query and get the complete info 100 at a time. You can build this for
> > your users over time.
>
> > Once list of friends for a user has been retrieved, the next time a
> > user comes, you can just get the latest set of friends and add them to
> > the existing records.
>
> > -Nischal
>
> > On Sep 30, 4:01 pm, artesea <ryancul...@gmail.com> wrote:
>
> > > I was hoping on adding some ajax code to my web app to allow auto-
> > > completing of @usernames as you start typing
> > > eg:
> > > [...@jon]
> > > �...@jonathan
> > > �...@jon_smith
> > > �...@jonny
> > > I suspect I'll need to cache the names on my server, but was wondering
> > > if there was a quick API call to get just the usernames of the people
> > > you follow.
>
> > > statuses/friends gets me the username, but I also end up with more
> > > data than I need (bandwidth), and have to navigate in blocks of 100s
> > > (time).
> > > friends/ids looks perfect, limited info, brings back 5000 in one go,
> > > however I only get the ids.
>
> > > Is there a (hidden) option to get usernames instead of ids with
> > > friends/ ?
>
> > > Else if I have a user who is following 3000 people I will need to
> > > cursor through the api 30 times, just to build a cache file, by the
> > > time that is complete I'm sure the user will have completed the name.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to