From a5a98d36557214999f35d5d809cf35aa03b91a59 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 10 May 2015 20:36:29 -0400 Subject: generate the oauth url in the module, not the script --- lib/WWW/Pocket/Script.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/WWW/Pocket/Script.pm') 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"; ; $pocket->finish_authentication($code); -- cgit v1.2.3-54-g00ecf