Dr_SG's mostly links

Dr_SG's mostly links

Seth Greenblatt  //  A scientist born in Bath, Maine and living in Austin, Texas. Interested in Macs, Mindmaps, Social Networks, Blogging, and Microblogging

Oct 4 / 8:01pm

Tweetimag.es: No More Broken Avatars | Tech Inspiration

Twitter is a popular social networking site on internet with millions of users. As something gets popular over internet naturally several new applications come up based on that service. To tweetimages_logomake life easy for developers Twitter as released its API to use in applications. Most of them use Twitter image icon as primary avatar in their application, which poses a problem. If the user changes his image on Twitter with different file name then the image link in the application fails to load avatar. To solve this problem Digg PHP guru has created this Tweetimag.es which always loads correct Twitter avatar of the user.

How does it work?

- Twitter API sends a request to Amazon’s S3 service to retrieve Twitter avatar of a user.

- Something like this-

Media_httpa1twimgcomprofileimages396076570screenshot20090903at20412ampng_kdatzzejvmouszm

- So when a user changes his image on Twitter with different file name Twitter API request will be failed and broken avatar appears.

Solution

- If you are developing a new Twitter application then you can replace something like above with

http://img.tweetimag.es url/i/{username}_{size}

- Replace username in the above URL with the Twitter username and size with any one following letter m, n, b or o.

- These letters allow you to control the size of the thumbnail, insert “m” for a 24×24, “n” for 48×48, “b” for 73×73 or “o” for original size thumbnail.

image_sizes

This will always bring right Twitter image of user, because image is cached gives 0% chance of displaying broken avatar.

Applications which already use tweetimag.es  service are wefollow, pixly and Tweetforboobs.

You might also like:

What is Twitter, How Twitter works, Why is Twitter built?

World of Twitter – Mosaic Twitter Wallpapers

Tips for writing iPhone Applications
Blog Widget by LinkWithin

ShareThis