【问题标题】:Getting twitter stream using nodejs twit npm使用 nodejs twit npm 获取 twitter 流
【发布时间】:2015-04-10 23:31:49
【问题描述】:

我正在关注链接Twit NPM

访问 twitter 流。

我做以下事情

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)
});

我得到 Bad Request Error 401 。不知道为什么,因为如果我使用 curl 它可以工作。

【问题讨论】:

    标签: node.js twitter


    【解决方案1】:

    好的,我想通了。我的笔记本电脑上的时间比实际时间快 5 分钟,这是用未来的时间戳拨打电话,因此失败了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-17
      • 2021-11-17
      • 2020-01-16
      • 2014-04-30
      • 2020-10-11
      • 2019-02-24
      • 2019-04-10
      • 1970-01-01
      相关资源
      最近更新 更多