Net-SinaWeibo
view release on metacpan or search on metacpan
SYNOPSIS
# from sinaweibo app setting
my $app_key = 'xxxx';
my $app_key_secret = 'xxxxxxxxx';
my $client = Net::SinaWeibo->new(
app_key => $app_key,
app_key_secret => $app_key_secret);
# authorization
my $callback_url = 'http://youdomain.com/app_callback';
my $url = $client->get_authorize_url(callback_url => $callback_url);
# or don't use callback_url,just like a desktop client.
my $url = $client->get_authorize_url;
# now $client hold the request_token, but you must authorize your app first.
# let user go to visit the authorize url.
say 'Please goto this url:',$url;
# save these tokens to your file.
Net::SinaWeibo->save_tokens('~/app/var/tokens/my.tokens',
app_key => $app_key,
app_key_secret => $app_key_secret,
_request_token => $client->request_token->token,
lib/Net/SinaWeibo.pm view on Meta::CPAN
# from sinaweibo app setting
my $app_key = 'xxxx';
my $app_key_secret = 'xxxxxxxxx';
my $client = Net::SinaWeibo->new(
app_key => $app_key,
app_key_secret => $app_key_secret);
# authorization
my $callback_url = 'http://youdomain.com/app_callback';
my $url = $client->get_authorize_url(callback_url => $callback_url);
# or don't use callback_url,just like a desktop client.
my $url = $client->get_authorize_url;
# now $client hold the request_token, but you must authorize your app first.
# let user go to visit the authorize url.
say 'Please goto this url:',$url;
# save these tokens to your file.
Net::SinaWeibo->save_tokens('~/app/var/tokens/my.tokens',
app_key => $app_key,
app_key_secret => $app_key_secret,
_request_token => $client->request_token->token,
( run in 0.422 second using v1.01-cache-2.11-cpan-299005ec8e3 )