The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Webservice::Instagram - Simple Interface to Instagram oAuth API

VERSION

Version 0.01

SYNOPSIS

Step 1:

Get the AUTH URL to authenticate,

use Webservice::Instagram;

my $instagram = Webservice::Instagram->new( { client_id => 'xxxxxxxxxxxxxxx', client_secret => 'xxxxxxxxxxxxxxx', redirect_uri => 'http://domain.com', grant_type => 'authorization_code' } );

my $auth_url = $obj->get_auth_url(); print Dumper $auth_url; >

Step 2: Go to the above calculated URL in the browser, authenticate and fetch the code returned by the browser after authentication. The returned URL is usually of the form www.returnuri.com/?code=xxxxxxxxxxx

Step 3:

Now using the code, fetch the access_token and set it to the object,

my $access_token = $obj-get_access_token( $code ); #$code is fetched from Step 2. #Set the access_token to $instagram object $instagram->set_access_token( $access_token ); >

Step 3: Fetch resource using the object.

my $search_result = $obj-get( 'https://api.instagram.com/v1/users/search', { q => 'ravi' } }; >

SUBROUTINES/METHODS

get_auth_url

Returns the authorization URL that the user has to authorize against. Once authorized, the browser appends the code along to the redirect URL which will used for obtaining access_token later.

get_access_token

Once you have the code, you are ready to get the access_token.

get

Since you now have the access token, you can request all the resources on behalf of the API.

AUTHOR

Daya Sagar Nune, <dayanune at cpan.org>

BUGS

Please report any bugs or feature requests to bug-webservice-instagram at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Webservice-Instagram. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Webservice::Instagram

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2013 Daya Sagar Nune.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 103:

Unterminated C<...> sequence