-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
Hi, I'm not sure why I am getting errors every time here. recreate my secret, follow the guide here: (https://www.slickremix.com/docs/how-to-create-instagram-access-token/) to get a access_token, and then call like this:
function searchInstagram() {
var ig = require('instagram-node').instagram();
ig.use({ access_token: 'XXXXXX.XXXXXXXXXXXXXXXX' });
ig.use({ client_id: 'XXXXXXXXXXXXXXXXXXXXXXXXX',
client_secret: 'XXXXXXXXXXXXXXXXXXXXXXXXX' });
/* OPTIONS: { [min_tag_id], [max_tag_id] }; */
ig.tag_media_recent('tag', [], function(err, medias, pagination, remaining, limit) {
console.log('err', err);
console.log('medias', medias);
console.log('pagination', pagination);
console.log('remaining', remaining);
console.log('limit', limit);
});
}
searchInstagram();
But sadly when I call with node insta-service.js I always am getting this error:
node instagram-service.js
derp
err { Error: OAuthAccessTokenException: The access_token provided is invalid.
at handle_error (/Users/jameslynch/Git-Projects/Instagram-Serverless-Bot/node_modules/instagram-node/lib/instagram.js:242:19)
at /Users/jameslynch/Git-Projects/Instagram-Serverless-Bot/node_modules/instagram-node/lib/instagram.js:1195:16
at IncomingMessage.<anonymous> (/Users/jameslynch/Git-Projects/Instagram-Serverless-Bot/node_modules/instagram-node/lib/instagram.js:197:18)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
code: 400,
error_type: 'OAuthAccessTokenException',
error_message: 'The access_token provided is invalid.',
retry: [Function: retry] }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels