PHP code example of ner0tic / php-instagram-api

1. Go to this page and download the library: Download ner0tic/php-instagram-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ner0tic / php-instagram-api example snippets


$ig = new \Instagram\Client();

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

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

$ig = new \Instagram\Client();

$ig->setAuthClientId($id);
$ig->setAuthHttpPassword($pass);
$ig->setAuthUrlToken($token);
$ig->setAuthHttpToken($token);

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

$result = $api->get($endpoint, $parameters, $request_options);
js
    "  "ner0tic/php-api-core":     "2.0.0",
        "ner0tic/php-instagram-api":   "*"
        // ...