summaryrefslogtreecommitdiffstats
path: root/lib/WWW/Pocket/Script.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2015-05-10 20:36:29 -0400
committerJesse Luehrs <doy@tozt.net>2015-05-10 20:36:29 -0400
commita5a98d36557214999f35d5d809cf35aa03b91a59 (patch)
tree1c16f8058634cf322a4c5335a1f88e58a479eaf3 /lib/WWW/Pocket/Script.pm
parentc1d369a2dd57f1589d465c45deb3be58175bca94 (diff)
downloadwww-pocket-a5a98d36557214999f35d5d809cf35aa03b91a59.tar.gz
www-pocket-a5a98d36557214999f35d5d809cf35aa03b91a59.zip
generate the oauth url in the module, not the script
Diffstat (limited to 'lib/WWW/Pocket/Script.pm')
-rw-r--r--lib/WWW/Pocket/Script.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/WWW/Pocket/Script.pm b/lib/WWW/Pocket/Script.pm
index dfae0fe..d529ac9 100644
--- a/lib/WWW/Pocket/Script.pm
+++ b/lib/WWW/Pocket/Script.pm
@@ -99,9 +99,9 @@ sub _authenticate {
my $pocket = WWW::Pocket->new(consumer_key => $consumer_key);
my $redirect_uri = $self->redirect_uri;
- my $code = $pocket->start_authentication($redirect_uri);
+ my ($url, $code) = $pocket->start_authentication($redirect_uri);
- print "Visit https://getpocket.com/auth/authorize?request_token=${code}&redirect_uri=${redirect_uri} and log in. When you're done, press enter to continue.\n";
+ print "Visit $url and log in. When you're done, press enter to continue.\n";
<STDIN>;
$pocket->finish_authentication($code);