Search the Site

Sponsors

bottom corner

Update Twitter status programmatically with Perl and cURL

This note provides a sample Perl script that updates your Twitter status, making use of the cURL module.

This page is filed under keyword(s): perl.

#!/usr/bin/perl

# Setup
$u="username";
$p="password";
$upd="Hello world!";

# Leave this as-is
$url="http://twitter.com/statuses/update.xml";

# The actual command
$cmd = "/usr/bin/curl -u  $u:$p --data status=\"$upd\" $url";
system $cmd;

Did you find this page useful? Please consider browsing other articles or subscribing to the RSS feed to keep up with latest.

This page is filed under keyword(s): perl.
Author: C. Peter Chen
Last updated: 22 Jun 2009

bottom corner