photo © 2009 Rosaura Ochoa | more info (via: Wylio)</span></p>
After twitter switched over to oAuth and blocked regular authentication my cute little twitter bot that posted little quotes from the Linux program fortune was down and out. Well not any longer! Thanks to the magic of Perl and the Net::Twitter::Lite Library @unix_quote is now tweeting out quotes several times a day.
Here are the steps I used to get Fortune Bot back on line:
First I had to install Net::Twitter::Lite via cpan, next I registered via dev.twitter.com for my API Key, finally click on the “my token” option to get your oath_token
#!/usr/bin/perl
use Net::Twitter::Lite;my $nt = Net::Twitter::Lite->new(
consumer_key => “”,
consumer_secret => “”,
access_token => “”,access_token_secret => “”,
);
$quote = `/usr/games/fortune`;
$nt->update($quote);
Thanks to Semifor for the article that pointed me in the right direction!