I am wanting to run this perl script for my twitter account, but I was told i need something called Net::Twitter ( Here is the Net::Twittter readme). I don't know a thing about perl, so I dont know what to do.
Do I install the .tar.gz for Net::Twitter, or what.
Any help is appreciated.
btw, there is the script I'm wanting to run.
Code:
sub follow_everyone {
# just a few variables
my $results;
my @friends;
my @followers;
# get list off all friends, basically like using http://apiwiki.twitter.com/REST+API+Documentation#SocialGraphMethods
$results = $twit->friends_ids();
foreach my $tweet (@{ $results }) {
push(@friends, $tweet);
}
# same as above but for lollowers
$results = $twit->followers_ids();
foreach my $tweet (@{ $results }) {
push(@followers, $tweet);
}
# this compares friends with followers and and puts the differance in an array
%friends = map {$_, 1} @friends;
@difference = grep {!$friends {$_}} @followers;
# then follow each user_id from the differance http://apiwiki.twitter.com/REST+API+Documentation#create
foreach my $follower (@difference) {
$twit->create_friend({id=>$follower});
}
}
|