The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WWW::Twitter - Twitter interface (Without API).

SYNOPSIS

Usage:

use twitter;

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;

my $twitter = WWW::twitter->new( username => USERNAME, password => PASS);

$twitter->login;

$mystatus_id = $twitter->tweet('my first status'); print "mystatus_id $mystatus_id \n";

DESCRIPTION

Twitter::Shell Twitter interface. Do not make use of twitter API (Only username and password required)

FUNCTIONS

constructor

    my $twitter = WWW::twitter->new( username => USERNAME,
					password => PASS);

login

$twitter->login;

Login to the twitter account with the username and password provided. You MUST call this function before call any other function.

tweet

$mystatus_id = $twitter->tweet('my first status');

Make a tweet and return the tweet id

favorite

$status = $twitter->favorite($status_id);
print "favorite status $status \n"; # 1 = OK ; 0 = Something wrong

Mark as favorite a tweet. The functions needs the status id as a parameter. Return 1 if sucessful and 0 if something went wrong

retweet

$status = $twitter->retweet($status_id);
print "favorite status $status \n"; # 1 = OK ; 0 = Something wrong

Make a retweet of an update. The functions needs the status id as a parameter. Return 1 if sucessful and 0 if something went wrong

stats

$stats = $twitter->stats;	
$following = $stats->{following}/;
$followers = $stats->{followers};	
$total_status = $stats->{total_status};
$total_media = $stats->{total_media};
$favorites = $stats->{favorites};
print "following $following followers $followers  total_status $total_status  total_media $total_media  favorites $favorites  \n";	

Collect the stats of the current account.

dispatch Internal function

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html