logotop

Google Talk Status to Twitter

Jan 12th 2008
One Comment
respond
trackback

I had this idea in the back of my mind about making it easier to post to twitter.com Quite a few of my friends post some pretty hilarious status messages on Gtalk so I thought there must be an easier way to get from Gtalk status to Twitter.

The old way was to add the Twitter bot as your friend and IM the bot when you wanted to post something to twitter. My way automatically posts your Gtalk status to twitter at specific intervals.

I used some code examples for Twitterbook, (a facebook app) posted by Stuart Robertson @ Designmeme.com and the code he used by on posting to twitter using PHP.

The final piece of the puzzle is completed by Jabberland, a wonderful spanish site that allows you to serve up your Jabber status in a numbers of ways mostly for creating a widget on your website that displays your status. We add the jabberland bot to our friends list and use the code on the site to create a plaintext response for our Jabber Status.

Basically we use PHP to curl GET the plaintext file and then curl POST to Twitter’s API

Step 1)
Setup account @ Jabberland to post your Jabber status as plaintext

  1. Your JID is your gtalk login such as: example@gmail.com
  2. Choose the output format:
  3. Copy the url and paste save it for the php file in the next step.

Step 2)
Add the bot@jabberland.com to your contacts list. This is mandatory if you want to maintain up to date your information.

Step 3)
Download my modified PHP script and upload to your webserver.

Make sure to modify the file with your settings, and then change the file extension to .php

Step 4)
Setup your cron tab to execute your PHP code on a regular basis.
Here are some instruction on setting up a crontab with Dreamhost

Set 5)
Enjoy the ease of updating your Twitter Status using Gtalk




This post is tagged

One Response

  1. Dan says:

    I’ve taken this code and hacked it into a multi-user database-backed web service that anyone can sign up for.

    http://www.danray.net/gtalk-to-twitter/

    Thanks for the starting point! Couldn’t have built it without you!

Leave a Reply

You must be logged in to post a comment.