Download the PHP package sofwar/instagram without Composer

On this page you can find all versions of the php package sofwar/instagram. 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

Instagram PHP API V1

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

Composer package available.

Requirements

Get started

To use the Instagram API you have to register yourself as a developer at the Instagram Developer Platform and create an application. Take a look at the uri guidelines before registering a redirect URI. You will receive your client_id and client_secret.


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«.


Installation

I strongly advice using Composer to keep updates as smooth as possible.

Initialize the class

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>)

Get OAuth token

getOAuthToken($code, <boolean>)

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

Set / Get access token

User methods

Sample responses of the User Endpoints.

Relationship methods


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


Sample responses of the Relationship Endpoints.

Media methods

Sample responses of the Media Endpoints.

Comment methods


Please note that the authenticated methods require the comments scope.


Sample responses of the Comment Endpoints.

Tag methods

Sample responses of the Tag Endpoints.

Likes methods

Authenticated methods

Sample responses of the Likes Endpoints.

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


Signed Header

In order to prevent that your access tokens gets stolen, Instagram recommends to sign your requests with a hash of your API secret, the called endpoint and parameters.

  1. Activate "Enforce Signed Header" in your Instagram client settings.
  2. Enable the signed-header in your Instagram class:

  3. You are good to go! Now, all your requests will be secured with a signed header.

Go into more detail about how it works in the Instagram API Docs.

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.

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

Changelog

Please see the changelog file for more information.

Released under the BSD License.


All versions of instagram with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 sofwar/instagram contains the following files

Loading the files please wait ....