Skip to content

Instantly share code, notes, and snippets.

@semifor
Created September 4, 2010 21:49
Show Gist options
  • Select an option

  • Save semifor/565521 to your computer and use it in GitHub Desktop.

Select an option

Save semifor/565521 to your computer and use it in GitHub Desktop.
#!/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