Reply To Tweet With Tweepy - Python
I can't seem to get tweepy to work with replying to a specific tweet: auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_KEY, ACCESS_SECRET) ap
Solution 1:
Just posting the solution so no someone else suffers the way I did.
Twitter updated the API and added an option named auto_populate_reply_metadata
All you need to do is set that to true, and the leave the rest as should be. Here is a sample:
api.update_status(status = 'your reply', in_reply_to_status_id = tweetid , auto_populate_reply_metadata=True)
Also, the status_id is the long set of digits at the end of the tweet URL. Good Luck!
Solution 2:
I ran into the same problem, but luckily I found the solution. You just need to include the user's screen_name in the tweet:
api.update_status('@<username> My status update', tweetId)
Solution 3:
You can also do
api.update_status("my update", in_reply_to_status_id = tweetid)
Solution 4:
Well then, it was something simple. I had to specify who the tweet was directed towards using the @ notation.
api.update_status('My status update @whoIReplyTo',tweetId)
Solution 5:
I discovered that I had to include the tweet's ID string (rather than actual ID number) when specifying the tweet that I was replying to
api.update_status('@whoIReplyTo my reply tweet',tweetIdString)
Post a Comment for "Reply To Tweet With Tweepy - Python"