Documentation: Net::Twitter
My goal is to have it return the lates status & screen name of the user searched for. I'm pretty confused by hash references, as when I use the dumper I just see this=>that=>this, but I can't figure out how to access all these things that I want.
But looking at the documentation for "lookup_users", it gives an array first, maybe since you can search multiple things, I think I figured out how to access that, but after that I'm not sure.
use warnings; use 5.010; use Net::Twitter; use Config::Tiny; use Data::Dumper qw(Dumper); use File::HomeDir; use Data::Dumper; my $nt = Net::Twitter->new( ssl => 1, traits => [qw/API::RESTv1_1/], consumer_key => '', consumer_secret => '', access_token => '', access_token_secret => '', ); my $l = $nt->lookup_users({ screen_name => 'twitter'}); my $tweet = (@{$l->{screen_name}}); print "$tweet\n";
Here I just tried to grab the screen name for a start, since the "status" is deeper. But this just gives me "Not a HASH reference"
In reply to Twitter API - Not a hash reference by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |