Enviar pesquisa
Carregar
Perl调用微博API实现自动查询应答
•
Transferir como PPT, PDF
•
0 gostou
•
1,261 visualizações
琛
琛琳 饶
Seguir
Perl, Dancer, LWP::UserAgent, OAuth2, weibo
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 22
Baixar agora
Recomendados
Mojolicious
Mojolicious
Lenz Gschwendtner
Web::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTP
Michael Francis
Mojolicious
Mojolicious
Marcos Rebelo
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Dotan Dimet
Pagination in PHP
Pagination in PHP
Vineet Kumar Saini
Country State City Dropdown in PHP
Country State City Dropdown in PHP
Vineet Kumar Saini
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
Vineet Kumar Saini
Mojolicious: what works and what doesn't
Mojolicious: what works and what doesn't
Cosimo Streppone
Recomendados
Mojolicious
Mojolicious
Lenz Gschwendtner
Web::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTP
Michael Francis
Mojolicious
Mojolicious
Marcos Rebelo
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Dotan Dimet
Pagination in PHP
Pagination in PHP
Vineet Kumar Saini
Country State City Dropdown in PHP
Country State City Dropdown in PHP
Vineet Kumar Saini
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
Vineet Kumar Saini
Mojolicious: what works and what doesn't
Mojolicious: what works and what doesn't
Cosimo Streppone
Blog Hacks 2011
Blog Hacks 2011
Yusuke Wada
Perl5i
Perl5i
Marcos Rebelo
ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?
abroekhuis
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
Yusuke Wada
Twib in Yokoahma.pm 2010/3/5
Twib in Yokoahma.pm 2010/3/5
Yusuke Wada
High-level Web Testing
High-level Web Testing
petersergeant
SQL Injection Part 2
SQL Injection Part 2
n|u - The Open Security Community
Drupal, meet Assetic
Drupal, meet Assetic
Kris Wallsmith
Mojolicious - A new hope
Mojolicious - A new hope
Marcus Ramberg
InnoDB Magic
InnoDB Magic
sunnygleason
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
Anatoly Sharifulin
RESTful web services
RESTful web services
Tudor Constantin
Bag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
Marcus Ramberg
16.mysql stored procedures in laravel
16.mysql stored procedures in laravel
Razvan Raducanu, PhD
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Bastian Hofmann
Silex Cheat Sheet
Silex Cheat Sheet
Andréia Bohner
PhoneGap: Local Storage
PhoneGap: Local Storage
Ivano Malavolta
Mojolicious on Steroids
Mojolicious on Steroids
Tudor Constantin
Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)
Oleg Zinchenko
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Puppet
Queue your work
Queue your work
Jurian Sluiman
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Ruben Tan
Mais conteúdo relacionado
Mais procurados
Blog Hacks 2011
Blog Hacks 2011
Yusuke Wada
Perl5i
Perl5i
Marcos Rebelo
ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?
abroekhuis
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
Yusuke Wada
Twib in Yokoahma.pm 2010/3/5
Twib in Yokoahma.pm 2010/3/5
Yusuke Wada
High-level Web Testing
High-level Web Testing
petersergeant
SQL Injection Part 2
SQL Injection Part 2
n|u - The Open Security Community
Drupal, meet Assetic
Drupal, meet Assetic
Kris Wallsmith
Mojolicious - A new hope
Mojolicious - A new hope
Marcus Ramberg
InnoDB Magic
InnoDB Magic
sunnygleason
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
Anatoly Sharifulin
RESTful web services
RESTful web services
Tudor Constantin
Bag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
Marcus Ramberg
16.mysql stored procedures in laravel
16.mysql stored procedures in laravel
Razvan Raducanu, PhD
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Bastian Hofmann
Silex Cheat Sheet
Silex Cheat Sheet
Andréia Bohner
PhoneGap: Local Storage
PhoneGap: Local Storage
Ivano Malavolta
Mojolicious on Steroids
Mojolicious on Steroids
Tudor Constantin
Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)
Oleg Zinchenko
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Puppet
Mais procurados
(20)
Blog Hacks 2011
Blog Hacks 2011
Perl5i
Perl5i
ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
Twib in Yokoahma.pm 2010/3/5
Twib in Yokoahma.pm 2010/3/5
High-level Web Testing
High-level Web Testing
SQL Injection Part 2
SQL Injection Part 2
Drupal, meet Assetic
Drupal, meet Assetic
Mojolicious - A new hope
Mojolicious - A new hope
InnoDB Magic
InnoDB Magic
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
RESTful web services
RESTful web services
Bag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
16.mysql stored procedures in laravel
16.mysql stored procedures in laravel
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Silex Cheat Sheet
Silex Cheat Sheet
PhoneGap: Local Storage
PhoneGap: Local Storage
Mojolicious on Steroids
Mojolicious on Steroids
Keep It Simple Security (Symfony cafe 28-01-2016)
Keep It Simple Security (Symfony cafe 28-01-2016)
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Destaque
Queue your work
Queue your work
Jurian Sluiman
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Ruben Tan
Php Inspections (EA Extended): if-conditions optimization
Php Inspections (EA Extended): if-conditions optimization
Vladimir Reznichenko
Jenkins Acceleration
Jenkins Acceleration
Patrick Paechnatz
Distributed Logging System Using Elasticsearch Logstash,Beat,Kibana Stack and...
Distributed Logging System Using Elasticsearch Logstash,Beat,Kibana Stack and...
Sanjog Kumar Dash
Zero mq logs
Zero mq logs
Tomas Doran
Destaque
(6)
Queue your work
Queue your work
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Php Inspections (EA Extended): if-conditions optimization
Php Inspections (EA Extended): if-conditions optimization
Jenkins Acceleration
Jenkins Acceleration
Distributed Logging System Using Elasticsearch Logstash,Beat,Kibana Stack and...
Distributed Logging System Using Elasticsearch Logstash,Beat,Kibana Stack and...
Zero mq logs
Zero mq logs
Semelhante a Perl调用微博API实现自动查询应答
Perl web app 테스트전략
Perl web app 테스트전략
Jeen Lee
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Kacper Gunia
The Zen of Lithium
The Zen of Lithium
Nate Abele
PHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4Developers
Kacper Gunia
Simple blog wall creation on Java
Simple blog wall creation on Java
Max Titov
Mashing up JavaScript
Mashing up JavaScript
Bastian Hofmann
Add loop shortcode
Add loop shortcode
Peter Baylies
Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )
Yoshi Sakai
HappyKardashian.com for #FVCP
HappyKardashian.com for #FVCP
Eric Michalsen
QA for PHP projects
QA for PHP projects
Michelangelo van Dam
I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord
An introduction to Laravel Passport
An introduction to Laravel Passport
Michael Peacock
Perl Web Client
Perl Web Client
Flavio Poletti
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Masahiro Nagano
ApacheCon 2005
ApacheCon 2005
Adam Trachtenberg
Intro To Moose
Intro To Moose
cPanel
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
Masahiro Nagano
WordPress Plugin & Theme Security - WordCamp Melbourne - February 2011
WordPress Plugin & Theme Security - WordCamp Melbourne - February 2011
John Ford
Becoming a better WordPress Developer
Becoming a better WordPress Developer
Joey Kudish
Using WordPress as your application stack
Using WordPress as your application stack
Paul Bearne
Semelhante a Perl调用微博API实现自动查询应答
(20)
Perl web app 테스트전략
Perl web app 테스트전략
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
The Zen of Lithium
The Zen of Lithium
PHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4Developers
Simple blog wall creation on Java
Simple blog wall creation on Java
Mashing up JavaScript
Mashing up JavaScript
Add loop shortcode
Add loop shortcode
Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )
HappyKardashian.com for #FVCP
HappyKardashian.com for #FVCP
QA for PHP projects
QA for PHP projects
I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
An introduction to Laravel Passport
An introduction to Laravel Passport
Perl Web Client
Perl Web Client
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
ApacheCon 2005
ApacheCon 2005
Intro To Moose
Intro To Moose
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
WordPress Plugin & Theme Security - WordCamp Melbourne - February 2011
WordPress Plugin & Theme Security - WordCamp Melbourne - February 2011
Becoming a better WordPress Developer
Becoming a better WordPress Developer
Using WordPress as your application stack
Using WordPress as your application stack
Mais de 琛琳 饶
{{more}} Kibana4
{{more}} Kibana4
琛琳 饶
ELK stack at weibo.com
ELK stack at weibo.com
琛琳 饶
More kibana
More kibana
琛琳 饶
Monitor is all for ops
Monitor is all for ops
琛琳 饶
Add mailinglist command to gitolite
Add mailinglist command to gitolite
琛琳 饶
Skyline 简介
Skyline 简介
琛琳 饶
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
琛琳 饶
Logstash
Logstash
琛琳 饶
DNS协议与应用简介
DNS协议与应用简介
琛琳 饶
Mysql测试报告
Mysql测试报告
琛琳 饶
Perl在nginx里的应用
Perl在nginx里的应用
琛琳 饶
Mais de 琛琳 饶
(11)
{{more}} Kibana4
{{more}} Kibana4
ELK stack at weibo.com
ELK stack at weibo.com
More kibana
More kibana
Monitor is all for ops
Monitor is all for ops
Add mailinglist command to gitolite
Add mailinglist command to gitolite
Skyline 简介
Skyline 简介
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
Logstash
Logstash
DNS协议与应用简介
DNS协议与应用简介
Mysql测试报告
Mysql测试报告
Perl在nginx里的应用
Perl在nginx里的应用
Último
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Roshan Dwivedi
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Último
(20)
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Slack Application Development 101 Slides
Slack Application Development 101 Slides
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Perl调用微博API实现自动查询应答
1.
微博#cpan#机器人
2.
3.
Where is Perl?
4.
老版本不可用!
5.
let's DIY!
6.
申请微博应用
7.
获取应用密钥
8.
设置授权回调页
9.
Dancer -a weiboexp •
package WeiboExp; • use Dancer ':syntax'; • use Dancer::Plugin::Deferred; • use Net::OAuth2::Client; • get '/user/login' => sub { • redirect &client->authorize; • }; • true;
10.
• sub client
{ • Net::OAuth2::Profile::WebServer->new( • name => 'weibo', • site => 'https://api.weibo.com', • client_id => config->{app_key}, • client_secret => config->{app_secret}, • authorize_path => '/oauth2/authorize', • access_token_path => '/oauth2/access_token', • access_token_method => 'POST', • token_scheme => 'uri-query:access_token', • redirect_uri => uri_for('/user/profile'), • ); • };
11.
• get '/user/profile'
=> sub { • my $session = &client->get_access_token(params->{code}); • deferred error => $session->error_description if $session->error; • my $uid_res = $session->get('/2/account/get_uid.json'); • if ( $uid_res->is_success ) { • my $uid = (decode_json $uid_res->decoded_content)->{'uid'}; • my $ushow_res = $session->get("/2/users/show.json?uid=${uid}"); • if ( $ushow_res->is_success ) { • my $user = decode_json $ushow_res->decoded_content; • session user => { name => $user->{'name'}, hdimg => $user- >{'profile_image_url'} }; • deferred success => sprintf "Welcome back, %s", $user->{name}; • template 'profile', { user => $user }; • } • } else { • deferred error => $uid_res->status_line . 'get_uid'; • redirect '/'; • }; • };
12.
weiboexp/views/profile.tx • <img src="<:
$user.avatar_large :>"/><br/> • 微博地址:<a href="http://weibo.com/<: $user.domain :>">http://weibo.com/<: $user.domain :></a><br/> • 签名档:<: $user.description :><br/> • 住址:<: $user.location :><br/> • 个人网站:<a href="<: $user.url :>"><: $user.url :></a><br/> • 最新微博:<: $user.status.text :>
13.
Great, But where
is the bot?
14.
应用授权信息
15.
SO Easy now!
16.
• #!/usr/bin/env perl •
use JSON; • use 5.010; • use HTTP::Request; • use LWP::UserAgent; • use URI::Escape qw(uri_escape); • # read from $session->access_token() • my $token = '2.00kSQGIB1Q6J9C3d32741b********'; • my $session = LWP::UserAgent->new; • my $api_base = 'https://api.weibo.com'; • while(1) { • get_mention(); • sleep 30; • };
17.
• sub get_mention
{ • my $mention_res = $session- >get("${api_base}/2/statuses/mentions.json?access_token=${token}"); • if ( $mention_res->is_success ) { • my $statuses = ( decode_json $mention_res->decoded_content )- >{'statuses'}; • my $regexstr = q(#cpan#); • for my $status ( @{ $statuses } ) { • my $mid = $status->{'id'}; • my $msg = $status->{'text'}; • if ( $msg =~ s{$regexstr}{}i and $msg =~ s{@ARGVs+?}{}i ) { • my $ret = uri_escape(mcpan_query($msg)); • my $create_res = $session- >post("${api_base}/2/comments/create.json?access_token=${token}&id=${ mid}&comment=${ret}"); • if ( $create_res->is_success and ! ( decode_json $create_res- >decoded_content )->{'error'} ) { • say "Create Comments OK!"; • } • } • } • } • }
18.
• sub mcpan_query
{ • my $modulename = shift; • my $ua = LWP::UserAgent->new; • my $req = HTTP::Request->new( 'POST', "http://api.metacpan.org/v0/module/_search" ); • $req->header( 'Content-Type' => 'application/json' ); • $req->content(encode_json({ • query => { query_string => { query => $modulename, } }, • filter => { term => { status => 'latest', } }, • fields => [ 'release', 'author' ] • })); • my $res = $ua->request( $req ); • return $res->status_line unless $res->is_success; • my $hits = decode_json $res->decoded_content; • my @url = keys { map { 'https://metacpan.org/release/' . $_- >{fields}->{author} . '/' . $_->{fields}->{release} => 1 } @{ $hits- >{hits}->{hits} } }; • my $short_url = shorten(@url); • return join ' ', @$short_url; • }
19.
• sub shorten
{ • my $url = shift; • my $shorten_res = $session- >get( "${api_base}/2/short_url/shorten.json?access_toke n=${token}&url_long=" . join('&url_long=', @{$url}) ); • if ( $shorten_res->is_success ) { • my $urls = ( decode_json $shorten_res- >decoded_content )->{'urls'}; • my @short_url = map { $_->{url_short} } @{$urls}; • return @short_url; • } else { • say $shorten_res->status_line; • } • }
20.
结果
21.
see More • https://github.com/CPAN-API/metacpan-developer •
https://metacpan.org/pod/Net::OAuth2::Client • https://metacpan.org/pod/Search::Elasticsearch • http://www.elasticsearch.org/guide/ • http://open.weibo.com/wiki/授权机制说明 • http://open.weibo.com/wiki/微博API
22.
谢谢!
Baixar agora