Skip to content

Instantly share code, notes, and snippets.

@simongcc
Created September 8, 2016 03:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simongcc/d933177ce79f1c7070f5edf2205b545b to your computer and use it in GitHub Desktop.
Save simongcc/d933177ce79f1c7070f5edf2205b545b to your computer and use it in GitHub Desktop.
/*
Last updated: 2016/Sep/08
step to fetch data from instagram api
1. Register account in instagram
2. Go to API section (since the footer is not fixed at the bottom, one must go to Edit Profile and go to API link at the bottom.
3. Manage Clients > Register a New Client
4. Go to Security Tab inside the New Client
5. add URIs for redirect, only allowed URIs can fetch the access token (URIs can include .html)
6. use this url to get access token:
https://www.instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=ALLOWED_URIs&response_type=token&scope=public_content
7. fetch media with tags example:
https://api.instagram.com/v1/tags/DPARK/media/recent?access_token=TOKEN&count=100
* in Sandbox mode, only a maximum of 16 medias will be fetched each time from the JSON response
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment