toReply = "someonesTwitterName" #user to get most recent tweet
api = tweepy.API(auth)
#get the most recent tweet from the user
tweets = api.user_timeline(screen_name = toReply, count=1)
for tweet in tweets:
api.update_status("@" + toReply + " This is what I'm replying with", in_reply_to_status_id = tweet.id)
我想你已经通过了tweepy的认证。在
现在,如果你想创建一个机器人,你必须每隔n秒检查一次新的tweet,如果他们有一条你还没有回复的tweet,你可以用这样的方法回复tweet
相关问题 更多 >
编程相关推荐