message = " Truly agreed with you "
for tweet in tweepy.Cursor(api.search, q='seo_regio', lang = 'en').items(1):
try:
print("Found tweet by:@" + tweet.user.screen_name)
api.update_status(status = "Truly agreed with you #IndianPolitics", in_reply_to _status_id = tweet.id_str)
print("responded to @" + tweet.user.screen_name)
if tweet.user.following == False:
tweet.user.follow()
print("following @" + tweet.user.screen_name)
答案 0 :(得分:1)
要回复推文,您必须像以前一样使用in_reply_to_status_id
,并且还必须在文本开头提及用户:
api.update_status(status = "@" + tweet.user.screen_name + " Truly agreed with you #IndianPolitics", in_reply_to_status_id = tweet.id_str)