1

所以我使用 Twit https://github.com/ttezel/twit作为节点

我想从 twitter 1.1 api 获取 OEMBED 代码,但它似乎不起作用。

twit.get('statuses/oembed', { id: 133640144317198338 },  function (err, data, response) {
            console.log(data);
            console.log(err);

        })

所以我只是不断收到未定义的返回给我,url 模式似乎是正确的,但我不知道为什么它不起作用。

这是记录的错误

{ [Error: Sorry, that page does not exist]
  message: 'Sorry, that page does not exist',
  statusCode: 404,
  code: 34,
  allErrors: [ { message: 'Sorry, that page does not exist', code: 34 } ],
  twitterReply: '{"errors":[{"message":"Sorry, that page does not exist","code":34}]}' }

我能够检索雕像和几乎所有其他东西,但 oembed 不起作用。

任何帮助都会很棒

这是 Twitter 的 OEMBED api 的链接https://api.twitter.com/1.1/statuses/oembed.json?id=240192632003911681

4

2 回答 2

1

在你的推文 ID 周围加上一些引号。我遇到了这个,因为我正在喂一个状态id,而不是id_str

于 2015-03-31T11:04:47.447 回答
0

在您的推文 ID 周围插入一些引号。

于 2017-07-03T07:29:49.057 回答