Twitter REST API并没有给我扩展推文

时间:2018-06-18 14:02:00

标签: twitter

自2017年以来,推文的长度可达280个字符。

为了保持向后兼容性,它们会在旧的"文本"中返回截断的文本。端点的json响应的属性

https://api.twitter.com/1.1/statuses/show/1008131929286332417

It is claimed here(根据"扩展推文")在这些情况下,还有一个" extended_tweet"包含带有全文和其他内容的json的属性,如页面示例所示。

还声称" extended_tweet"当"截断"时应该出现是的。

我的测试请求中没有看到这一点 - 这是我得到的回复,略有缩写:

{
  "created_at": "Sat Jun 16 23:39:16 +0000 2018",
  "id": 1008131929286332417,
  "id_str": "1008131929286332417",
  "text":
    "That\u2019s not to say that separating things into files isn\u2019t helpful. It lets you choose an appropriate balance betwee\u2026 <url removed for SO's benefit>",
  "truncated": true,
  "entities": { ... },
  "source":
    "\u003ca href=\"https://mobile.twitter.com\" rel=\"nofollow\"\u003eTwitter Lite\u003c/a\u003e",
  "in_reply_to_status_id": 1008131488481730561,
  "in_reply_to_status_id_str": "1008131488481730561",
  "in_reply_to_user_id": 70345946,
  "in_reply_to_user_id_str": "70345946",
  "in_reply_to_screen_name": "dan_abramov",
  "user": { ... },
  "geo": null,
  "coordinates": null,
  "place": null,
  "contributors": null,
  "is_quote_status": false,
  "retweet_count": 10,
  "favorite_count": 151,
  "favorited": false,
  "retweeted": false,
  "lang": "en"
}

我还尝试过参数include_ext_alt_textinclude_entities as described here,但这没有区别。

发生了什么?

0 个答案:

没有答案