Flickr-Upload

 view release on metacpan or  search on metacpan

flickr_upload  view on Meta::CPAN


        }
        die "Bad OAuth token received! verifier => '$request_token{verifier}', token => '$request_token{token}'\n"
            unless $request_token{verifier} =~ /^[0-9a-f]+$/ && $request_token{verifier} =~ /^[0-9a-f-]+$/;
    }
    else {
        die "Unable to initiate OAuth authorization. Response from Flickr was: '$response'\n";
    }
    my $ac_rc = $ua->oauth_access_token(\%request_token);
    if($ac_rc eq 'ok') {
        print "Saving OAuth credentials to $oauth_config\n";
        $ua->export_storable_config($oauth_config);
    }
}

if(!exists $args{'auth_token'} && -r $oauth_config) {
    $ua = Flickr::Upload->import_storable_config($oauth_config);
    bless $ua, 'Flickr::Upload';
}

die "No auth token or OAuth credentials found.\nUse --auth or --oauth to generate credentials or --auth_token to specify a token.\n"
    unless exists $args{'auth_token'} || $ua->is_oauth;

if( $check ) {
	exit( checkToken( $ua, $args{api_key}, $args{auth_token} ) );
}

die "No image specified to upload.\n" unless @ARGV;

$args{'tags'} = join( " ", @tags ) if @tags;

flickr_upload  view on Meta::CPAN

token should be kept somewhere like C<~/.flickrrc> since it's necessary
for actually uploading images.

=item --auth_token <auth_token>

Authentication token. You B<must> get an authentication token using
C<--auth> before you can upload images. See the L<EXAMPLES> section.

=item --oauth

Interactively perform OAuth authorization with Flickr. The user will get a URL to visit at Flickr at which Flickr::Upload must be granted write permissions. After granting permission, the user will be redirected to a dummy URL that contains an OAuth ...

=item --title <title>

Title to use on all the images. Optional.

=item --description <description>

Description to use on all the images. Optional.

=item --public <0|1>

flickr_upload  view on Meta::CPAN

Set to 1 to keep the photo in global search results, 2 to hide from public
earches.

=back

Note that options unknown to Flickr will result in undefined behaviour.

=item --check

Checks the authentication token via the flickr.auth.checkToken API call.
This can be used to verify API keys and credentials without trying to
upload an image. The output is the raw results of the API call.

=item --progress, --no-progress

Display a progress bar for each upload with L<Term::ProgressBar>. That
optional module will have to be installed on the system.

The default is not to display a progress bar. That can be changed in
the configuration file:



( run in 0.264 second using v1.01-cache-2.11-cpan-4d50c553e7e )