Created
September 4, 2010 21:49
-
-
Save semifor/565521 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/perl | |
| # | |
| # Net::Twitter - OAuth desktop app example | |
| # | |
| use warnings; | |
| use strict; | |
| use Net::Twitter; | |
| use Data::Dumper; | |
| # You can replace the consumer tokens with your own; | |
| # these tokens are for the Net::Twitter example app. | |
| my %consumer_tokens = ( | |
| consumer_key => 'YOUR KEY', | |
| consumer_secret => 'YOUR KEY SECRET', | |
| access_token => 'YOUR TOKEN', | |
| access_secret => 'YOUR TOKEN SECRET', | |
| ); | |
| my $nt = Net::Twitter->new(traits => [qw/API::REST OAuth/], %consumer_tokens); | |
| my $status = $nt->user_timeline({ count => 1 }); | |
| print Dumper $status; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment