Created
October 4, 2009 23:16
-
-
Save semifor/201690 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# simple Twitter Search API example with object inlfation | |
use warnings; | |
use strict; | |
use Net::Twitter; | |
my $nt = Net::Twitter->new( | |
traits => ['API::Search', 'InflateObjects' ], | |
decode_html_entities => 1, | |
); | |
my $r = $nt->search('perl net::twitter'); | |
for my $tweet ( @{$r->results} ) { | |
printf "%s: %s\n", $tweet->from_user, $tweet->text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment