Twitter API: Picking the Right Source

I’m sure you noticed that a few weeks ago Twitter changed the source that came unsigned via the API from web to API which could basically reveal any robot that is trying to act human, right? Well if you look at the statuses/update method in the Twitter API documentation they don’t say anything about the source parameter. Strange, right?

Well I read something about it on some forums and the Twitter API development talk Google Group had a discussion about this I believe, but most people still think that it’s the X-Twitter- headers that determine the source, but it’s not. It’s way too simple and it took me a few hours to figure it out using an HTTP sniffer on TweetDeck, Seesmic Desktop and the others.

Turns out it’s the source parameter that is passed via POST together with the status text during the statuses/update call. So usually you would do something like:

$postargs = array("status" => "I'm tweeting via API!");
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postargs);

Now, how about Seesmic Desktop?

$postargs = array(
    "status" => "I'm tweeting via Seesmic Desktop!",
    "source" => "seesmicdesktop"
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postargs);

Or TweetDeck perhaps?

$postargs = array(
    "status" => "I'm tweeting via TweetDeck!",
    "source" => "tweetdeck"
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postargs);

Pretty cool, huh? Here’s a brief list of sources to pick from:

And I do believe that it’s the same way for all the other clients. Lowercase and no spaces. It is funny though watching a robot tweet 10 tweets per minute via TwitterFon ;)

WordPress Junkies: Blogging via iPhone

I wrote about offline blogging with Windows Live Writer some time ago, and now I realized that it’s not that fun! Alright, I have two good news. The first one’s that I received approval for my second wordpress plugin (Related External Links) to be hosted at the official WordPress Plugin Directory. I commited the first beta a few minutes ago so go ahead and vote it up: Related External Links (thanks!).

The second news is… Y’know I’ve been dreaming about it since it was first announced. Yeah, I finally got myself an Apple iPhone!! Woot! It’s so sad that Moscow hasn’t got 3G internet yet (MTS announced it for the end of 2009) but I’ve got Wi-Fi at home and office plus EDGE everywhere else, so I guess I’ll survive. The first thing you definitely have to install on a brand new iPhone is TwitterFon. Get it for free from the iTunes Application Store (via iTunes on PC or App Store on your phone) and you’ll be tweeting 24/7, sending TweetPics along with your iPhone GPS coordinates. Jeez I’m so excited (BTW follow me!).

Anyways. Back to WordPress. I really appreciate that the WordPress team made this iPhone App. You can get it for free at the iTunes Application Store. It’s very user friendly and all the functionality you’d need is plugged into this little app. I’ve made some screenshots (thanks to @CMoz) to show you the whole process. Make sure you read the comments to each shot.

One more thing. If you’re into iPhone, you should definitely check out: Apps and Hats. It’s a brand new video blog about iPhone apps, which is launching 20th of March. Make sure you subscribe to their RSS feed and/or follow the Apps and Hats Twitter account. I think they’ll be using TwitterFeed to tweet their blog updates. Cheers!