Uploading images to services like TwitPic is actually as easy as sending a HTTP POST request, which means its also pretty darned simple to upload something from Flash Player 10 or AIR. This is an example for AIR, but doing something similar in Flash Player 10 should also be possible – you just need to swap the references to the File class to FileReference.

So, how do we get our photos on TwitPic? Well, let’s check the API: TwitPic API. According to the API, it’s just a case of posting an image file with additional parameters of username, password and if you like, message. And the upload location is pretty simple too - http://twitpic.com/api/upload or http://twitpic.com/api/uploadAndPost. One for just uploading, and the other for posting things to your twitter feed at the same time.
If you’re posting automatically to twitter, TwitPic will automatically add the url to your image to the start of your tweet.
So, let’s check out some basic code:
Read More…
