Tweetimag.es: No More Broken Avatars

In: Other| Tech Tips

4 Oct 2009

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-

http://a1.twimg.com/profile_images/396076570/Screen_shot_2009-09-03_at_2.04.12_AM.png

- 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.

Blog Widget by LinkWithin

Comment Form

Follow Us on Twitter

About this blog

Hello, Welcome to Tech Inspiration. Here, we try to keep you up-to-date with Technology updates, Web 2.0, Software reviews, gadgets and more!; We hope you will love it and visit us more often. You can follow our feed here. If you have any questions, feel free to contact us. Hope you enjoy Tech Inspiration and take it easy.

-->

Subscribe to Our Newsletter and Get Updates via Email

Enter your email address: