Skip to content

Instantly share code, notes, and snippets.

@pstuifzand
Created July 31, 2009 13:40
Show Gist options
  • Save pstuifzand/159226 to your computer and use it in GitHub Desktop.
Save pstuifzand/159226 to your computer and use it in GitHub Desktop.
Command line Twitter
# Simple commandline twitter script.
# Reads a line from STDIN and updates twitter.
# This doesn't work anymore, because of OAuth.
# Net::Twitter does support OAuth so it could be rewitten to make it work
# Created by Peter Stuifzand <peter.stuifzand@gmail.com>
use strict;
use warnings;
use Net::Twitter;
use Data::Dumper;
my $user = "USERNAME";
my $password = "PASSWORD";
my $nt = Net::Twitter->new(
traits => [qw/API::REST/],
username => $user,
password => $password,
);
my $update = <>;
chomp $update;
$nt->update({ status => $update });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment