[tpm] Working with Net::Twitter

Scott Elcomb psema4 at gmail.com
Fri Mar 27 13:29:45 PDT 2009

On Mon, Mar 23, 2009 at 9:06 PM, Scott Elcomb <psema4 at gmail.com> wrote:
> The update() function works fine (entry "Playing with Net::Twitter")
> and readTweets() seems to work except for the fact that $speaker
> (which should be within the angle brackets in the output) does not get
> set.  I found no references to a "from_user" hash key in the POD save
> for the one line in the synopsis.  Could just be that I'm blind.

Or just not thinking.  Data::Dumper popped into my head a few minutes
ago and naturally it reveals the answer.  :-)

In case anyone's interested, the line I'd used in the OP
  my $speaker =  $tweet->{from_user};

should be
  my $speaker = $tweet->{user}->{screen_name}; # or {name}

  Scott Elcomb

More information about the toronto-pm mailing list