I can’t seem to get tweepy to work with replying to a specific tweet:
JavaScript
x
11
11
1
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
2
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
3
4
api = tweepy.API(auth)
5
6
### at this point I've grabbed the tweet and loaded it to JSON...
7
8
tweetId = tweet['results'][0]['id']
9
10
api.update_status('My status update',tweetId)
11
The api says it takes optional parameters and in_reply_to_status_id is the first, but it seems to be ignoring it altogether. This script will post an updated status, but it does not link it as a reply to the tweetId that I’m passing.
API for reference: http://code.google.com/p/tweepy/wiki/APIReference#update_status
Anyone have any ideas? I feel like I’m missing something simple here…
Thanks in advance.
Advertisement
Answer
Well then, it was something simple. I had to specify who the tweet was directed towards using the @ notation.
JavaScript
1
2
1
api.update_status('My status update @whoIReplyTo',tweetId)
2