Twittering from My Cheap Prepaid Mobile Phone

Well. Even our PM Kevin Rudd has a Twitter account (and have more followers than I do, which is actually not surprising :). I guess that at least justifies me spending a bit too much time tweeting -- I am just doing what our PM is also doing :) However only being able to tweet in front of my computer is no fun. How else can I tweet about the lunch I had on Saturday, with a photo attached?

Well. Sending tweets from mobile photos is actually relatively trivial -- if you have a nice phone that can run a nice native Twitter application, and Internet connection from your phone. If you are low-tech, then at least you can SMS your tweets to an international number (IDD SMS rate applies). I am on prepaid 3, which didn't have Internet until very recently (with a ridiculously expensive data charges). I have a 3Skypephone, which half of the J2ME program would refuse to run...

But, the phone does come with a working email client (not great though). Moreover if you sign up to even the cheapest X-Series pack from 3, you get unlimited email to/from Three's server, and they don't count against your data cap. So that gave me an idea...

This is how I tweet now.

  1. Take a photo of the "happening" with my phone. Yup. 2MP with a tiny sensor = crappy shots, but picture > 1000 words. So attaching a picture is the best way around Twitter's 140 character limit.
  2. Attach this picture to an email. The recipient has a cryptic email address on my server. In the body of the email I typed in "Lunch for saturday..."
  3. Send!
  4. My server would receive the email, and a Python script got invoked from procmail to parse the message.
  5. Photo found as an attachment! Use Flickr API (+ Beej's Flickr API wrapper for Python) to upload it onto my Flickr account.
  6. Shorten the URL to my Flickr photo using my own URL shortening service (written in good ol' PHP and jQuery).
  7. Append the shortened URL to the content of the email, and send the whole text to Twitter (+ Python-Twitter library)

Done! Step 4-7 are all automated, and now I can share the latest photos on Twitter, and my FriendFeed and Facebook friends can also see the photos I uploaded to Flickr. Now I just need to figure out how to take better pictures.