PHP code example of muhamadrezaar / instagram

1. Go to this page and download the library: Download muhamadrezaar/instagram 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/ */

    

muhamadrezaar / instagram example snippets

sh
php artisan vendor:publish
sh

/* 	NOTES
 *  Jika hanya menampilkan data pribadi saja , cukup masukan userId dan accesToken
 *  Jika diperlukan autentikasi login semua nya wajib di isi 
 */
	
	return [
		'userId' => 'user-id-kamu',
		'accessToken' => 'access-token-kamu',
		
		'clientId' => 'client-id-kamu',
		'clientSecret' => 'client-secrets-kamu',
		'redirectUri' => 'redirect-uri-kamu',
	];

sh



foreach(IG::lowResolution() as $row)
{
	echo "<img src = '".$row."' />";
}

sh



foreach(IG::standardResolution() as $row)

{
	echo "<img src = '".$row."' />";
}

sh



echo IG::username();

echo IG::bio(); 

echo IG::website();

echo IG::pic();

echo IG::fullName();

echo IG::countFollowers();

echo IG::countFollowing();

sh



foreach(IG::displayFollowers() as $row)

{
	echo $row['full_name'];
	echo $row['profile_picture'];
	echo $row['username'];
	echo $row['id'];
}

sh



foreach(IG::displayFollowing() as $row)

{
	echo $row['full_name'];
	echo $row['profile_picture'];
	echo $row['username'];
	echo $row['id'];
}

sh

echo "<a href = '".IG::getCodeAuth()."'>Login</a>";
sh


$ig = IG::auth($_GET['code']);

print_r($ig);