Get Instagram Feeds in Json Format

How to get instagram feeds in json format to display on you website?

we can easily get feeds but if we need to display in desired format then we need this in JSON format.  Follow the steps below.

  1.  Login to Instagram account (which account’s feed you want to retrieve) and go to “https://instagram.com/developer/clients/manage/“.
  2. Now click on “Register a client” and add ‘Website URL’ & ‘Valid redirect URIs’ as your website where you want to show Instagram feeds.
  3. You will get a client ID and client secret code. Now you need to get the access token to continue.
  4. To get access token you have to hit the url “https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code“.  (CLIENT-ID -> you have this id, REDIRECT-URI -> you have this url)
  5. After this you will get the access token.
  6. Now you can get all Json feeds $feeds = file_get_contents(‘https://api.instagram.com/v1/users/USER-ID/media/recent?client_id=CLINT-ID&access_token=ACCESS-TOKEN‘);
  7. Best of Luck. You can use these Json fields as you want.

Leave a Reply