【问题标题】:'Sorry, that page does not exist.' code 34 for lists/statuses in Twitter API“对不起,那个页面不存在。” Twitter API 中列表/状态的代码 34
【发布时间】:2020-11-18 23:23:41
【问题描述】:

我认为我做对了。但它不断给我打电话的错误。我是否必须在 Twitter 设置中为列表/状态设置开发环境,或者在设置页面中需要做其他任何事情。

错误

[ { code: 34, message: 'Sorry, that page does not exist.' } ]

代码

var Twitter = require("twitter");

var client = new Twitter({
  consumer_key: "", //Removed it
  consumer_secret: "",
  access_token_key: "",
  access_token_secret: "",
});
  var params = {
  list_id: some_id, // Removed it
  include_rts: false,
  exclude_replies: true,
};

client
  .get("lists/statuses", params)
  .then((data) => {
    console.log(data);
  })
  .catch((err) => {
    console.log(err);
  });

它适用于lists/list,但不适用于lists/statuses...

【问题讨论】:

  • 您确定您使用的是有效的列表 ID 吗?由于您使用的是 JavaScript,您是否使用了_str ID 值?
  • @AndyPiper 是的!我已经尝试过idid_str。不同的是,lists/statuses [ { code: 34, message: 'Sorry, that page does not exist.' } ] code 首先出现,但端点错误,例如 lists/statusesss 它会显示类似 [ { message: 'Sorry, that page does not exist', code: 34 } ] 的错误,其中 code 第二出现。

标签: node.js twitter


【解决方案1】:

参数选项中没有exclude_replies。 你应该这样做

var params = {
  list_id: some_id, // Removed it
  include_rts: false,
};

这会起作用的......

【讨论】:

    猜你喜欢
    • 2018-10-16
    • 2017-12-12
    • 2015-04-22
    • 2012-10-06
    • 2016-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-04
    相关资源
    最近更新 更多