Created
October 13, 2009 16:57
-
-
Save sugyan/209368 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
use strict; | |
use warnings; | |
use Encode 'decode_utf8'; | |
use Net::Twitter::Lite; | |
my $nt = Net::Twitter::Lite->new( | |
consumer_key => 'http://twitter.com/oauth_clients で登録したもの', | |
consumer_secret => 'http://twitter.com/oauth_clients で登録したもの', | |
); | |
# The client is not yet authorized: Do it now | |
print "Authorize this app at ", $nt->get_authorization_url, "\n"; | |
print "and enter the PIN# :"; | |
my $pin = <STDIN>; # wait for input | |
chomp $pin; | |
my($access_token, $access_token_secret) = $nt->request_access_token(verifier => $pin); | |
print "access_token: $access_token\n"; | |
print "access_token_secret: $access_token_secret\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment