Skip to content

ADDA-js/instagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instagram

Description

This is made to get a access token for the Instagram API. Once you have a token, you can use ajax to get a json object from the API.

Get a Token

Login with your instagram account here to get a token

Example

Once you have a token, create an app.js with the code below.

console.log('working yo');

var token = 'PASTE YOUR TOKEN HERE!';

$(document).ready(function() {
    //once the doc is ready get the data from the api
    $.ajax({
      type: 'GET',
      //the url is the endpoint you want to hit
      //change to get different data from the api
      url: 'https://api.instagram.com/v1/users/self/?access_token='+token,
      dataType: 'jsonp'

    }).done(render)
 });


//if request to api is successful, this function will run
function render(data) {
  //now you have access to whatever data you ask for from instagram.
  //this example is grabing information about yourself
  //see the different endpoints to know what you can do!
}

Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published