Skip Menu |

This queue is for tickets about the Net-Flickr-Backup CPAN distribution.

Report information
The Basics
Id: 77335
Status: open
Priority: 0/
Queue: Net-Flickr-Backup

People
Owner: Nobody in particular
Requestors: kaoru [...] slackwise.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Better docs for flickr.auth_token
Please find below some notes from my time trying to figure out what the flickr.auth_token meant. It would be great if these could be added to the POD in some way. ============================== Steps ================================== 1. Create a new App Now you have an API key and an API secret ----------------------------------------------------------------------- 2. Set up the App with an arbitrary callback URL 2.1 Go to your profile page's sharing page (http://www.flickr.com/account/sharing/) 2.2 Click on your API key link to go to your App's page 2.3 Click through to your Backup app 2.4 On the right in the "admin" section go to "edit authentication flow" 2.5 Add any old URL ----------------------------------------------------------------------- 3. Authorize the App 3.1 Create config.ini with a block [flickr] that contains api_key and api_secret 3.2 Run ./get_auth_token.pl 3.3 Visit the URL and authorize the App by following the instructions 3.4 Get the 'frob' parameter's value from the callback URL you end up at ----------------------------------------------------------------------- 4. Get an auth_token 4.1 Visit the Flickr API Explorer for flickr.auth.getToken (http://www.flickr.com/services/api/explore/flickr.auth.getToken) 4.2 Add the frob from 3.4 above and submit the form with the 'Call Method...' button 4.3 Copy the value between the <token> tags into the config.ini as flickr.auth_token ----------------------------------------------------------------------- 5. Set up the rest of your config.ini Follow the instructions from the Net::Flickr::Backup POD NOTE - the default of 'fetch_original=true' will fail if you do not have a Flickr Pro account, as Flickr does not give you access to your original photos unless you have a Pro account. ----------------------------------------------------------------------- 6. Run ./do_backup.pl =======================================================================
Forgot attachments...
Subject: do_backup.pl
#!/usr/bin/perl use strict; use warnings; use Net::Flickr::Backup; use Log::Dispatch::Screen; my $Flickr = Net::Flickr::Backup->new('config.ini'); my $Logger = Log::Dispatch::Screen->new('name' => 'info', 'min_level' => 'info'); $Flickr->log()->add($Logger); $Flickr->backup();
Subject: get_auth_token.pl
#!/usr/bin/perl use strict; use warnings; use feature 'say'; use URI; use Config::Simple; use Digest::MD5; my $Config = Config::Simple->new('config.ini'); my $api_key = $Config->param('flickr.api_key'); if (!$api_key) { die "Did not find flickr.api_key in config.ini"; } my $api_secret = $Config->param('flickr.api_secret'); if (!$api_secret) { die "Did not find flickr.api_secret in config.ini"; } my $URI = URI->new('http://flickr.com/services/auth/'); my %params = ( 'api_key' => $api_key, 'perms' => 'read', ); my $api_sig = Digest::MD5::md5_hex( join("", $api_secret, (map { "$_$params{$_}" } sort keys %params) ) ); $params{'api_sig'} = $api_sig; $URI->query_form(%params); say $URI;
Hi, Yeah, those would be great additions. Do you have a Github account? That's where the Net-Flickr- modules are being maintained. https://github.com/straup/p5-Net-Flickr-Backup Can you send a pull request? Cheers,
Subject: Re: [rt.cpan.org #77335] Better docs for flickr.auth_token
Date: Wed, 23 May 2012 15:38:07 +0100
To: bug-Net-Flickr-Backup [...] rt.cpan.org
From: Alex Balhatchet <kaoru [...] slackwise.net>
Hey Aaron, I do have a github account. I'll see what I can do about writing a patch and submitting a pull request sometime this week :-) Thanks! - Alex On Wed, May 23, 2012 at 3:34 PM, Aaron Straup Cope via RT <bug-Net-Flickr-Backup@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=77335 > > > Hi, > > Yeah, those would be great additions. Do you have a Github account? > That's where the Net-Flickr- modules are being maintained. > > https://github.com/straup/p5-Net-Flickr-Backup > > Can you send a pull request? > > Cheers, >