instagram-node-lib
instagram-node-lib copied to clipboard
Missing client_id or access_token URL parameter
I got this error executing below code :
OAuthParameterException occurred: Missing client_id or access_token URL parameter. in _request
var instagram_client_id = '43345435345'; var instagram_client_secret = '4354565564'; var instagram_access_token = '3454656.3443532f0e6524'
instagram.set('client_id', instagram_client_id); instagram.set('client_secret', instagram_client_secret); instagram.set("access_token", instagram_access_token);
app.post('/subscribe', function(req, res){ instagram.tags.recent({ name: current_tag, count: 1, complete: function(data){ console.log(data) } });
});
I've seen a similar error: Missing access_token URL parameter.
. It was fixed by adding one line to_request_
in class.instagram.js
:
options['headers']['Content-Length'] = post_data.length;
options['headers']['Content-Type'] = 'application/x-www-form-urlencoded'; // this is the new line
I think this project might be abandoned, but if not I'm happy to do a PR.
Looks like with
Instagram.set('access_token', IG_TOKEN)
instead of client_id
and client_secret
, you can set the access token. But you need to get your access token by some other ways.