Skip to content

Instantly share code, notes, and snippets.

@adamloving
Created March 4, 2016 21:42
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 adamloving/8bad7be08cd970428939 to your computer and use it in GitHub Desktop.
Save adamloving/8bad7be08cd970428939 to your computer and use it in GitHub Desktop.
Node instagram search example (including getting an access token)
const Instagram = require('instagram-node-lib')
Instagram.set('client_id', 'xxx')
Instagram.set('client_secret', 'xxx')
// to get an access_token
let url = Instagram.oauth.authorization_url({
redirect_uri: 'http://mysite.com'
})
url = url.replace('response_type=code', 'response_type=token')
console.log(url)
// after you've got one...
Instagram.set('access_token', 'xxx')
Instagram.tags.recent({
name: "seattle",
complete: (data) => {
console.log(data)
},
error: console.log
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment