是否有任何变通上获取最新的使用Twitter的REST API v1.1的微博对话 [英] Is there any work around on fetching twitter conversations using latest Twitter REST API v1.1

查看:170
本文介绍了是否有任何变通上获取最新的使用Twitter的REST API v1.1的微博对话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作在需要检索Twitter用户的通话的项目。比如我要得到这个鸣叫 BBC世界服务的所有答复。使用 REST API v1.1的我可以时间轴(鸣叫,重新鸣叫) Twitter用户的。但我没有找到任何文件/上获取特定的鸣叫答复工作围绕工作。是否有任何变通上得到一个特定的tweet的答复呢?

I am working on a project where the conversation of a twitter user needs to be retrieved. For example i want to get all the replies of this tweet of BBC World Service. Using the REST API v1.1 i can get the timeline (tweet, re-tweet) of a twitter user. But i did not find any documentation/working work around on fetching replies of a specific tweet. Is there any work around on getting the replies of a specific tweet at all?

推荐答案

API调用来得到的答复到一个特定的鸣叫。你可以,但是,骗!

There is no API call to get replies to a specific tweet. You can, however, cheat!

使用搜索API 你可以构造一个搜索查询是:

Using the Search API you can construct a search query which is:


  • 在答复 @bbcworldservice

  • 发生的之后的鸣叫被张贴。

  • (可选)的的具体日期/时间。

  • In reply to @bbcworldservice.
  • Occurred after the tweet was posted.
  • Optionally, before a specific date / time.

因此​​,在这种情况下,类似

So, in this case, something like

https://api.twitter.com/1.1/search/tweets.json?
    q=%23bbcworldservice&
    since_id=489366839953489920&
    count=100

您会得到推文列表(最多100个)。然后,您将需要寻找他们 in_reply_to_status_id_str ,看看它是否你要找的状态相匹配。

You'll get a list of Tweets (up to 100). You will then need to search them for in_reply_to_status_id_str and see if it matches the status you're looking for.

这篇关于是否有任何变通上获取最新的使用Twitter的REST API v1.1的微博对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆