diff --git a/postgresqleu/util/messaging/twitter.py b/postgresqleu/util/messaging/twitter.py index d31d78a5c..279b18524 100644 --- a/postgresqleu/util/messaging/twitter.py +++ b/postgresqleu/util/messaging/twitter.py @@ -248,7 +248,9 @@ def post(self, tweet, image=None, replytotweetid=None): }, timeout=30) if r.status_code != 200: return (None, 'Media upload: {}'.format(r.text)) - d['media_ids'] = r.json()['media_id'] + d['media'] = { + 'media_ids': r.json()['media_id'], + } while d['text']: r = self.tw.post('https://api.twitter.com/2/tweets', json=d, timeout=30)