Thanks to Dave and natefanaro,
the Perl doc is quite clear, but I could not find a suitable property
or method that retrieves just my twits, the ones I generate from my
account.
thanks to Dave's suggestion I found the answer, which is the
following:
use Net::Twitter;
use Data::Dumper;
my $nt = Net::Twitter->new(
traits => [qw/API::REST/],
username => 'user',
password => 'pass'
);
my $timeline = $nt->user_timeline;
for my $tweet (@$timeline) {
print $tweet->{created_at} . ': ' . $tweet->{text};
}
working perfectly.
Thanks again
> Your $nt is just the interface to the API. If you want to, say, get the
> latest status updates to your/your friends' accounts, you need to use
> that interface to retrieve them:
>
> my $timeline = $nt->friends_timeline;
> for my $tweet (@$timeline) {
> print $tweet->{created_at} . ': ' . $tweet->{text};
>
> }
>
> (Code is untested, but should work. Note that the maintainer of
> Net::Twitter was talking a couple months ago about wrapping the
> retrieved messages up into objects, so $tweet may no longer be a bare
> hashref; I just haven't needed to update my direct Twitter-interfacing
> functions since then so I haven't stayed on top of it. Check the
> Net::Twitter documentation for full details.)
>
> --
> Dave Sherohman