Download the PHP package pecee/instagram-sdk without Composer

On this page you can find all versions of the php package pecee/instagram-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package instagram-sdk

Image Instagram PHP API v3.3.0

A PHP wrapper for the Instagram API.
Feedback or bug reports are appreciated.

Now supports Instagram video responses.

Requirements

Get started

To use the Instagram API with OAuth you have to register yourself as developer at the Instagram Developer Platform and set up an App. Take a look at the uri guidlines before registering a redirect URI.

Please note that Instagram mainly refers to »Clients« instead of »Apps«. So »Client ID« and »Client Secret« are the same as »App Key« and »App Secret«.

A good place to get started is the example App.

Initialize the class

Pure PHP

Laravel

This package offers Laravel support out of the box. These steps are required to setup the package.

Configure application

Add Service provider and register Facade

Authenticate user (OAuth2)

Get user likes

All methods return the API data json_decode() - so you can directly access the data.

Available methods

Setup Instagram

new Instagram(<array>/<string>);

array if you want to authenticate a user and access its data:

string if you only want to access public data:

Get login URL

getLoginUrl(<array>,<string>)

Optional scope parameters: To find out more about Scopes, please visit https://www.instagram.com/developer/authorization/

Get OAuth token

getOAuthToken($code, <true>/<false>)

true : Return only the OAuth token
false [default] : Returns OAuth token and profile data of the authenticated user

Set / Get access token

Set access token, for further method calls:
setAccessToken($token)

Return access token, if you want to store it for later usage:
getAccessToken()

User methods

Public methods

Authenticated methods

Sample responses of the User Endpoints.

Relationship methods

Authenticated methods


Please note that the modifyRelationship() method requires the relationships scope.


Sample responses of the Relationship Endpoints.

Media methods

Public methods

Sample responses of the Media Endpoints.

Comment methods

Public methods

Authenticated methods


Please note that the authenticated methods require the comments scope.


Sample responses of the Comment Endpoints.

Tag methods

Public methods

Sample responses of the Tag Endpoints.

Likes methods

Authenticated methods

How to like a Media: Example usage
Sample responses of the Likes Endpoints.

All <...> parameters are optional. If the limit is undefined, all available results will be returned.

Instagram videos

Instagram entries are marked with a type attribute (image or video), that allows you to identify videos.

An example of how to embed Instagram videos by using Video.js, can be found in the /example folder.


Please note: Instagram currently doesn't allow to filter videos.


Pagination

Each endpoint has a maximum range of results, so increasing the limit parameter above the limit won't help (e.g. getUserMedia() has a limit of 90).

That's the point where the "pagination" feature comes into play.
Simply pass an object into the pagination() method and receive your next dataset:

Iteration with do-while loop.

Samples for redirect URLs

Registered Redirect URI Redirect URI sent to /authorize Valid?
http://yourcallback.com/ http://yourcallback.com/ yes
http://yourcallback.com/ http://yourcallback.com/?this=that yes
http://yourcallback.com/?this=that http://yourcallback.com/ no
http://yourcallback.com/?this=that http://yourcallback.com/?this=that&another=true yes
http://yourcallback.com/?this=that http://yourcallback.com/?another=true&this=that no
http://yourcallback.com/callback http://yourcallback.com/ no
http://yourcallback.com/callback http://yourcallback.com/callback/?type=mobile yes

If you need further information about an endpoint, take a look at the Instagram API docs.

Example App

Image

This example project, located in the example/ folder, helps you to get started.
The code is well documented and takes you through all required steps of the OAuth2 process.
Credit for the awesome Instagram icons goes to Ricardo de Zoete Pro.

More examples and tutorials:

Let me know if you have to share a code example, too.

History

Instagram 3.2.0 - 09/07/2014

Instagram 3.1.0 - 09/07/2014

Instagram 3.0.0 - 08/07/2014

Instagram 2.1 - 30/01/2014

Instagram 2.0 - 24/12/2013

Instagram 2.0 beta - 20/11/2013

Instagram 2.0 alpha 4 - 01/11/2013

Instagram 2.0 alpha 3 - 04/09/2013

Instagram 2.0 alpha 2 - 14/06/2013

Instagram 2.0 alpha 1 - 28/05/2012

Instagram 1.5 - 31/01/2012

Instagram 1.0 - 20/11/2011

Instagram 0.8 - 16/11/2011

Instagram 0.5 - 12/11/2011

Credits

Copyright (c) 2014 - Andrej Badin Released under the BSD License.

Instagram-PHP-API contains code taken from Christian Metz's Instagram-PHP-API, also licensed under BSD License.


All versions of instagram-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pecee/instagram-sdk contains the following files

Loading the files please wait ....