I can't make an API call to instagram with Express and below is my code that I followed online, but still failed =[ Am I missing something?
var express = require('express');
var instagram = require('instagram-node').instagram();
var access_token = 'my token'; // not displaying it in public
app.get('/api/profile', function(req,res){
instagram.use({
access_token: access_token
});
instagram.media_popular(function(err,medias,remaining,limit){
if(err){throw err}
console.log('medias',medias);
res.send('You made it!!');
});
});
via learner
No comments:
Post a Comment