Skip to content

Instantly share code, notes, and snippets.

@semifor
Created October 4, 2009 23:16
Show Gist options
  • Save semifor/201690 to your computer and use it in GitHub Desktop.
Save semifor/201690 to your computer and use it in GitHub Desktop.
#!/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