Carl: They provide the URL to the image in all of that users updates,
so if you are getting tweets for a user, you are getting their profile
picture (avatar) URL.  It shouldn't require any additional calls.


Alex: Any easy way to appease everyone who needs to access it, without
doing any infrastructure changes on your part, is to add a new API
call, http://twitter.com/statuses/user_avatar/username (for example).
Then when someone requests that URL, you just do a 302 redirect to the
avatar's current location.

Some of the nice things about doing a 302 temporary redirect are:
- For API Users, they never need to worry about where it is or what it
is named, they just need the twitter username (user id would be good
to support too)
- If you guys ever need to move all of those images out of amazon to
your own, or other solution, you can and it wouldn't effect anyone.
- ability to perform statistical analysis on who is requesting them,
and how often.
- doesn't require any changes to your current caching system, just a
minor change to the API


Xeoncross: The image files can also have endings in '.gif', '.jpeg',
or '.png'.  They do not currently convert the images into a single
format, which is another reason the 302 redirect that I proposed above
would be ideal.


-Joel

On Oct 9, 8:38 am, Carl Crawley <[EMAIL PROTECTED]> wrote:
> jstrellner wrote:
> > I don't think they should do anything, but ask you guys to cache the
> > profile pictures yourself.  By linking directly to the file, you are
> > increasing their Amazon costs.  It doesn't take much to cache it
> > yourself, and then every time someone does an update, you just check
> > to see if the old URL that you have matches the new one, and if it
> > doesn't, go get another copy of it to replace your cached file.
>
> > I am not sure if they have encouraged, or discouraged hot-linking to
> > their files, but it probably is the best solution to cache it, and one
> > that Twitturly uses.
>
> > -Joel
>
> I can see what you're saying Joel, but surely to reduce the number of
> API calls to the API would be more of a saving to the load on Twitter
> rather than the 0.00001$ saving by caching the images on my servers....
>
> C.

Reply via email to