Created
July 31, 2009 13:40
-
-
Save pstuifzand/159226 to your computer and use it in GitHub Desktop.
Command line Twitter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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