How long can we access a past profile picture?

1,860 views
Skip to first unread message

yama

unread,
Jun 22, 2011, 8:24:24 AM6/22/11
to Twitter Development Talk
Hi guys,
I'm planning to store a Profile Picture URL to DB from json by search
API.
When a user change picture, it seems we can still access it for a
while.
But is it permanent or just short term?

I found there are 2 ways to get profile pics.
"http://a3.twimg.com/profile_images/1407755095/cat_normal.jpg"
and
"http://api.twitter.com/1/users/profile_image/watermusica.xml".
Shouldn't I user the former way?

Thank you,
yama

Matt Harris

unread,
Jun 23, 2011, 5:38:28 PM6/23/11
to twitter-deve...@googlegroups.com
Hi yama,

Older profile images maybe available for a short period of time after they are changed. This is due to caching and you shouldn't assume they will be there permanently.

In answer to your other question, yes you should use the URL provided in the user object of the API responses. The second method is a rate limited API request and you should avoid using it as the URL for a profile image.

Best,
@themattharris
Developer Advocate, Twitter





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

yama

unread,
Jun 27, 2011, 5:03:23 AM6/27/11
to Twitter Development Talk
Thanks Matt,

Oh that's right!
It consumes API rate limit using the second method.
So, if I consider a rate limited API, I should user the first method,
which is just a link to image.
But then, when user change it, the possibility of unaccessible to the
image may occur.
Is it right?

I have to show a lot of comments with the images on my website.
So, probably i will user the first one to show the profile image.

Thanks,
yama



Reply all
Reply to author
Forward
0 new messages