Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Uploading to Imgur with Perl

by Cody Fendant (Friar)
on Apr 12, 2013 at 23:11 UTC ( #1028466=perlquestion: print w/replies, xml ) Need Help??
Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone managed to make Image::Imgur work?

The POD is missing the line where you actually create the object, (someone's added it on AnnoCPAN) but it doesn't work for me anyway. There's also a host() method mentioned which doesn't seem to exist either.

What I get returned is '1004' which means invalid API key. But Imgur doesn't have "API keys", it has OAuth client IDs and client secrets etc.

Does this Module work for anyone?

Replies are listed 'Best First'.
Re: Uploading to Imgur with Perl
by davido (Archbishop) on Apr 12, 2013 at 23:59 UTC

    From the deficient test suite you can see an example of how it's intended to be instantiated (I've obscured an email address and the API key, but you can find them in the test file):

    # API Key provided by my $apikey = "b3625162_____________805b1840452"; my $imgur = new Image::Imgur(key=>$apikey); ok( $imgur ); my $result = $imgur->upload(' +ng'); ok( $result );

    There is this explanation in the docs for WWW::Imgur:

    Image::Imgur is an alternative module for It uses the XML version of the API rather than the JSON one which WWW::Imgur uses, and it depends on the Moose module. It uses an older version of the Imgur API.

    I noticed also that WWW::Imgur says that even that module (WWW::Imgur) is using the deprecated API, so the one that Image::Imgur is using must really be outdated (and possibly no longer operational).


      Wow, somehow I missed how old it was. Both those modules are completely obsolete now, it appears.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1028466]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2018-06-25 04:36 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.