Reputation: 7951
I am following the link Twit NPM
to get access to twitter stream .
I do the following
var T = new Twit({
consumer_key: 'key',
consumer_secret: 'key',
access_token: 'key',
access_token_secret: 'key'
});
var stream = T.stream('statuses/sample.json');
stream.on('tweet', function (tweet) {
console.log(tweet)
});
And i get Bad Request Error 401 . Not sure why ,because if i use curl it works.
Upvotes: 1
Views: 462
Reputation: 7951
ok i figured out. The time on my laptop was 5mins faster that actual time, which was making the call with future timestamp and thus failing.
Upvotes: 1