Replying on a tweet with Twython
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sat Feb 17 09:13:50 EST 2018
On Sat, 17 Feb 2018 12:53:08 +0100, Cecil Westerhof wrote:
> Cecil Westerhof <Cecil at decebal.nl> writes:
>
>> I just found Twython. I managed to post a tweet with:
>> from twython import Twython
>> twitter = Twython(APP_KEY, APP_SECRET,
>> OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
>> posted = twitter.update_status(status = quote)
>>
>> But I want to send a reply on this tweet. I tried:
>> posted = twitter.update_status(status = follow_up, in_reply_id
>> = posted['id_str'])
>>
>> But that does not work. How could I make it work?
Define "does not work". What happens when you try?
- the computer catches fire;
- Blue Screen Of Death;
- you get a Python traceback;
- the police raid your house;
- the computer says "I'm sorry Dave, I'm afraid I can't do that";
- something else?
If you get a traceback, don't keep it a secret, please copy and paste it
so we can read it and possibly help.
If you *don't* get a traceback, what value does `posted` get? Please run
this:
print(posted, type(posted))
> I need to use the following:
> posted = twitter.update_status(status = follow_up,
> in_reply_to_status_id = posted['id'])
Okay. What happens when you try?
--
Steve
More information about the Python-list
mailing list