xtweet360 is a small perl script to publish your xbox status to twitter automatically. The main reason for writing this was because I didn’t want to have to sign up to yet another web service and give them my password for twitter. xtweet360 now publishes your full playing status including the level your on if you choose, and has a link to your gamer profile.

I’ve tested this on Linux but there is no reason why it can’t run on BSD, Windows or OS X.

Installation.

Make sure your perl installation works first, then you need to install a couple of perl modules:

LWP::UserAgent

XML::Simple

WWW::Shorten::TinyURL

On debian/ubuntu you can do:

sudo apt-get install libxml-simple-perl libcrypt-ssleay-perl libwww-shorten-perl

Now download/extract and edit your xtweet360.pl and change you gamertag, twitter name and twitter passsword.

my $gamertag = “<GAMERTAG>”;
my $twitter = “<TWITTER-NAME>”;
my $twitterpass = “<TWITTER-PASSWORD>”;

Also you can now included more information in your twitter update, such as what level your on. This causes LOTS more updates to twitter so you can disable this if you don’t want it. 0 = off, 1 =on.

my $longtwitter = 0;

You can now also set a custom finished playing message by editing the following line:

my $finish_message = “YOUR MESSAGE HERE”;

You can run the program manually but it make more sense to to cron this event so you get automatic updates. To do so just run:

crontab -e

and add:

*/15 * * * * ~/scripts/xtwitter/xtweet360.pl >> /dev/null 2>&1

This will run the script every 15 mins. The last part of the line stops you getting cron spam.

Thats it!

Downloads.

xtweet360 0.3 – Download – 09/03/09

xtweet360 0.2 – Download – 03/02/09

xtweet360 0.1 – Download – 01/02/09

by-nc
Private
You are protected by wp-dephorm: