如何使用 Twitter API v2 检索长度超过 280 个字符的推文?

问题描述 投票:0回答:1

Twitter 最近允许经过验证的用户发推文超过 280 个字符,最多 4000 个。当我使用 API 检索其中一条较长的推文时,我没有收到全文 - 它被截断了大约 280 个字符。我在 Twitter API 文档中没有看到任何关于此的注释,也许我错过了。检索推文时是否需要请求任何其他字段/扩展?以下是我当前使用的字段和扩展(在 Python 中):

tweet_fields_list = ["id",
                     "text",
                     "author_id",
                     "created_at",
                     "conversation_id",
                     "in_reply_to_user_id",
                     "referenced_tweets",
                     "attachments",
                     "entities"]

expansions_list = ["referenced_tweets.id", "attachments.media_keys"]

media_fields_list = ["media_key","type","url"]
twitter tweepy twitterapi-python twitter-api-v2
1个回答
0
投票

不幸的是,目前还不可能。看来他们仍然适用280个字符的限制,无论你是否是Twitter Blue订阅者。

如果超出 280 个字符限制,API 将返回 400 错误请求 错误。

看看:https://twitter.com/daily_reviewss/status/1690131882153758720

© www.soinside.com 2019 - 2024. All rights reserved.