Ucodice Technologies
Ucodice Technologies Pvt. Ltd.
Ucodice Technologies Pvt. Ltd.
Ucodice Technologies Pvt. Ltd.

How to display Instagram uploaded images on website

Steps : How to display Instagram uploaded images on website :

 

Many websites may require to display Images uploaded on Instagram directly on their website. Instagram provides an API that can be utilized & person doesn't have to upload the images in websites also to be listed them automatically on their website.

 

  1.  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,

  • Alternatively you can login using facebook account too. 

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

 

  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.

 

http://instagram.pixelunion.net/

 

  1. You have to click on the button that is displayed 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 generating Access Token Key, integrate this Access Token key with API for fetching images from your Instagram Account.

 

  1. Format of the Generated Token:

544758xxxx.xxxxed0.fb27d9db186f47168eed3b9534de5f78

 

  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);

curl_close($ch);

return $result;

}

 

$result = fetchData("https://api.instagram.com/v1/users/self/media/recent/? 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.

 

 

By:-

Harshita Maheshwari - Jr. Software Engineer

 

 

 

 

 

 

 

 

 

 

 

Ucodice Technologies
Ucodice Technologies Pvt. Ltd.
Ucodice Technologies Pvt. Ltd.
Ucodice Technologies Pvt. Ltd.
Menu

Comments

  • pavni jaiswal

    A greatt article.

    • pavni jaiswal
    • 4
  • Mauricio

    An impressive share! I have just forwarded this onto a co-worker who was doing a little research on this. And he actually ordered me breakfast simply because I found it for him... lol. So let me reword this.... Thanks for the meal!! But yeah, thanks for spending the time to discuss this topic here on your site.

    • Mauricio
    • 4

Please share your views with us

Check if you want to display your email-id.

Let's collaborate

write to us

contact@ucodice.com

Contact Form