Getting Flickr::API to work on Ubuntu Linux SOLVED

In order to use the Flickr::API example by Gabor Szabo, I needed to create a LWP object specifying the path to the system certificates when creating the Flickr::API object.

Works:

my $flickr_api = Flickr::API->new( {
    key       => $key,
    # secret  => $secret,
    unicode   => 1,
    lwpobj    => LWP::UserAgent->new(
        ssl_opts => { 
            SSL_ca_path => '/etc/ssl/certs',
        },
    ),
}); 

Doesn’t work Perl(reports a 500 error with “Can’t connect to api.flickr.com:443 (certificate verify failed)” ) :

my $flickr_api = Flickr::API->new( {
    key       => $key,
    # secret  => $secret,
    unicode   => 1,
    ssl_opts  => { 
        SSL_ca_path       => '/etc/ssl/certs',
    },
});

You could use Mozilla::CA as brian d foy suggests but the bundled file is from 2014. Personally, I’ll use the certificate files from the OpenSSL project. 🙂

Share Button

The Perl Review: Issue 5.1, Winter 2008 has been released!

brian d foy and crew release another amazing Perl Review magazine issue.  If you haven’t subscribed yet, please please do so, it is a treasure trove of information!  You can even claim the subscription on your 2009 taxes as a business expense.  How cool is that?!?

Issue 5.1, Winter 2008

Surviving Your First Week of Perl (sample)

Issue 5.1, Winter 2008
Issue 5.1, Winter 2008

Programming with CPAN.pm (sample)

CPAN Patching with Git (sample)

Refactoring Factorial (sample)

Downloading From TiVo (sample)

plus Commentary and Module Reviews by Nadim Khemir, Perl News, and more…

Share Button