2.0.3 2013-06-02 18:44 UTC

This package is not auto-updated.

Last update: 2022-11-26 04:37:22 UTC


ORM agnostic php library to access instagram api


Add to composer

    "require": {
        "ner0tic/php-api-core":     "2.0.0",
        "ner0tic/php-instagram-api":   "*"
        // ...

Create your config file app/config/instagram.yml

url_client_id: XXXXXXXx
url_token: XXXXXXXx
http_password: XXXXXXXXXXX


$ig = new \Instagram\Client();

$photos = $ig->api('User')->recentMedia(); // recentMedia(array $options)

foreach($photos as $photo) {
  echo $photo // $photo->caption.' '.$photo->getLink()

Api's to choose from:

  • user
  • relationships
  • media
  • comments
  • likes
  • tags
  • locations
  • geographies

To set the auth settings manually

$ig = new \Instagram\Client();


If you have api keys to use, mash them into a pem file and set the certificate option to the path of the file.

$client->setOption('certificate', $pem_file);

Make a query

$result = $api->get($endpoint, $parameters, $request_options);


Laundry List

  • DI to access config.yml for variables