Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (19 sloc) 416 Bytes
use Net::Twitter;
use Data::Dumper ;
$user = shift ;
$pass = shift ;
my $nt = Net::Twitter->new(
traits => [qw/API::REST API::Search/],
username => $user,
password => $pass
);
my $result = $nt->direct_messages() ;
$i = 1 ;
print "\n" ;
foreach $msg (@$result)
{
print Dumper($msg) ;
print "msg #" . $i . " " ;
print $msg->{'sender_screen_name'} . ": " ;
print $msg->{'text'} . "\n\n" ;
}