PHP code example of guzzlehttp / guzzle-instagram-subscriber
1. Go to this page and download the library: Download guzzlehttp/guzzle-instagram-subscriber 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/ */
guzzlehttp / guzzle-instagram-subscriber example snippets
use GuzzleHttp\Client;
use GuzzleHttp\Subscriber\Instagram\ImplicitAuth;
$client = new Client();
$config = [
'username' => 'instagram_username',
'password' => 'instagram_password',
'client_id' => 'instagram_client_id',
'redirect_uri' => 'instagram_redirect_uri',
];
$implicitAuth = new ImplicitAuth($config);
$client->getEmitter()->attach($implicitAuth);
$client->post('https://instagram.com/oauth/authorize');
$access_token = $implicitAuth->getAccessToken();