回复特定推文,Twitter API [英] Replies to a particular tweet, Twitter API
问题描述
Twitter API 中是否有一种方法可以获取对特定推文的回复?谢谢
Is there a way in the Twitter API to get the replies to a particular tweet? Thanks
推荐答案
据我所知,没有办法直接做到这一点(至少现在不是).似乎应该添加一些东西.他们最近添加了一些转推"功能,添加此功能似乎也合乎逻辑.
From what I understand, there's not a way to do that directly (at least not now). Seems like something that should be added. They recently added some 'retweet' capabilities, seem logical to add this as well.
这是一种可能的方法,第一个示例推文数据(来自 status/show
):
Here's one possible way to do this, first sample tweet data (from status/show
):
<status>
<created_at>Tue Apr 07 22:52:51 +0000 2009</created_at>
<id>1472669360</id>
<text>At least I can get your humor through tweets. RT @abdur: I don't mean this in a bad way, but genetically speaking your a cul-de-sac.</text>
<source><a href="http://www.tweetdeck.com/">TweetDeck</a></source>
<truncated>false</truncated>
<in_reply_to_status_id></in_reply_to_status_id>
<in_reply_to_user_id></in_reply_to_user_id>
<favorited>false</favorited>
<in_reply_to_screen_name></in_reply_to_screen_name>
<user>
<id>1401881</id>
...
从 status/show
您可以找到用户的 ID.然后 statuses/mentions_timeline
将返回用户的状态列表.只需解析该返回,寻找与原始推文的 id
匹配的 in_reply_to_status_id
.
From status/show
you can find the user's id. Then statuses/mentions_timeline
will return a list of status for a user. Just parse that return looking for a in_reply_to_status_id
matching the original tweet's id
.
这篇关于回复特定推文,Twitter API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!