Displaying IMAGES And MEDIA Files In A Flash Based Twitter Feed Reader

This is a follow up to my previous post “Loading Twitter Feeds Into Flash (Through PHP)”
(Check it out for source code and other resources)

After successfully doing so, the next most obvious question of any Flash developer would be:

“Wow, Flash is awesome! So, can I display images and media files in my Flash Twitter feed reader?”

Well, son… The answer is both Yes and, um… No.

You can display direct links to media such as:
BUT Twitter has a 140 character limit (that’s just the idea behind Twitter, if it where longer it would be Tumblr). So a popular thing to do (in order to post long url image links) is use a service such as tinyURL to make the links tiny.
Amazon.com (for example) essentially displays as http://tinyurl.com/7i7r
Other sites (like Tumblr) will automatically tiny the url if you post an image, and set it to also post to Twitter. All these services are “hooked up”, so to speak, because it’s popular to post on one site and let that site automatically post to the other, etc… Such is the nature of social media. In most (if not all) cases you end up with a shortened URL.

So! The second million dollar question is:

“Can I display Tiny URL images in Flash?”

The answer is: Good luck with that, brosauce!
Shortened URL’s go through a number of gateways, (that are BEYOND HUMAN COMPREHENSION) and (like I said) Twitter is entirely text based (that’s the point of Twitter).
You can, on the other hand, use Twitpic (which is an image based Twitter substitute), and it posts to Twitter, but it posts the URL as a tiny one. There are others out there, but Twitpic is the most popular.
Here’s a good quote from the article “5 Ways to Share Images on Twitter” in regards to Quasimondo’s competition to write an image encoder/decoder to pack up an image inside a tweet.

“It would make a lot of sense for Twitter to build image sharing functionality into the Twitter web and mobile interfaces natively. It’s unlikely they’ll actually host any images (Twitter has always outsourced URL shortening, after all, first to TinyURL and more recently to Bit.ly), but we wouldn’t be surprised if Twitter someday added thumbnail preview functionality for shared image links.”

On another note; it’s easy to UPLOAD images from Flash TO Twitpic, but can you pull ’em in?
The only way, in the end, is to use a heavy weight solution such as .NET to load the image for you. Seems you need a powerhouse mediator. If you wrote some .NET software (or other similar solution) it would get the image for you.
URL wise you would do something like: /GetTwitPic.aspx?url=myimage.jpg
Then, BOOM! You’d have it.
You would potentially have to write 2 programs:
1) Load images from twitpic based on a URL or some unique identifier, which thus identifies a picture belonging to a post.
2) Load XML file for an account with recent Tweets.
A .NET (or similar superman) solution would do both for you.
Flash alone will not cut it… It seems.

So, in the end, if you’re a developer that has actually solved this issue, please leave a comment! I (as well as many others who probably have found this through Google by now) would love to know how you did it.