How to display Instagram uploaded images on website

Steps : How to display Instagram uploaded images on website :




  1. Firstly, An Instagram account is required for login.


  • If you have an account then login to your Instagram account with your Email Id or Mobile Number and Password,

  • Or, You have to log in to your Facebook account using your Facebook account id and password,

  • Otherwise, You have to create an account on Instagram and log in with that account on an Instagram website.


Link to Instagram Website for Login or Create New Account -


  1. If you are the new user, then you have to Upload Images to your Instagram account.


  1. Generate Access Token Key with the following link for your Instagram account.


  1. You have to click on the button that is displaying on the website for generating Access Token Key. – Generate Access Token.


  1. You are not logged in currently, then log in with your Instagram email id and password.


  1. After login to your account successfully, you will get Access Token.


  1. After generating Access Token Key, integrate this Access Token key with API for fetching images from your Instagram Account.


  1. Format of the Generated Token:



  1. API for fetching Images via Access Token Key. We are using Curl Session for integrating API.


$accessToken = "544758xxxx.xxxxed0.fb27d9db186f47168eed3b9534de5f78";


function fetchData($url)


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_TIMEOUT, 20);

$result = curl_exec($ch);


return $result;



$result = fetchData(" access_token=".$accessToken);


$result = json_decode($result);


  1. Access $result array value on the view page where you want to display all the Instagram images on the website.




Harshita Maheshwari - Jr. Software Engineer













No Comments Posted Yet (Be The First To Comment On This)

Please share your views with us
Check if you want to display your email-id.
Enter the sum of digits
10+7 =