【问题标题】:How to reply to a particular user's most recent tweet using Tweepy?如何使用 Tweepy 回复特定用户的最新推文?
【发布时间】:2016-11-28 05:02:21
【问题描述】:

我找到了这段代码

toReply = "xxx" 
api = tweepy.API(auth)



tweets = api.user_timeline(screen_name = toReply, count=1)

for tweet in tweets:
api.update_status("@" + toReply + " my reply", in_reply_to_status_id = tweet.id)

但这不是我要找的。它只是回复最新的推文。我希望机器人在每次 xxx 推文时回复。我应该对我的代码进行哪些更改?

【问题讨论】:

    标签: python twitter bots tweepy


    【解决方案1】:
    while True:
      for tweet in api.user_timeline(...):
    

    【讨论】:

      猜你喜欢
      • 2016-09-03
      • 2015-10-08
      • 1970-01-01
      • 1970-01-01
      • 2016-10-20
      • 2016-06-16
      • 2014-10-24
      • 1970-01-01
      • 2012-03-08
      相关资源
      最近更新 更多