You can cache the user's profile data so API lookups are kept to a
minimum.  Though the profile image should be hotlinked using whatever
value is stored int he profile_image_url attribute of the user object
returned from Twitter.  By using S3 as a central source Twitter is
able to help alleviate image sync issues that would arise when third
party services cache the image locally.  Also keep in mind that most
of the time your user's should already have their cache primed, via
twitter.com or another service, due the caching rules employed by
Twitter and S3.

On Jun 30, 6:32 am, Christian Fazzini <[email protected]>
wrote:
> Hello,
>
> We are in the process of developing a website that uses the Twitter
> API.
>
> I understand that the Twitter API is capable of retrieving a user's
> profile photo via:
>
> http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-users%C2%A0show
>
> Other websites that are using the Twitter API are, instead, getting
> these profile photos from Amazon's S3 storage service 
> (http://s3.amazonaws.com/twitter_production/).
>
> At current when a Twitter user logs onto our website, it will retrieve
> his information and store it our local db. At the same time it will
> also grab the profile photo from <profile_image_url> and store it on
> our server.
>
> In my opinion, this seems more appropriate instead of having the site
> quer the Twitters API and / or hotlink to Amazon's S3 storage service
> whenever a user loads a page. Especially, if it has to load several
> profile photos on every page load, on our site. I could be wrong
> here.
>
> What do you guys think the best approach for this is?
>
> Hoping to hear from you soon.
>
> Best regards,
> Chris

Reply via email to