large-video-upload-python
large-video-upload-python copied to clipboard
How do you post a tweet thread using this?
Hi Uploading a video works! How could i post an attached tweet to the tweet i uploaded a video for to make a thread? Thanks!
Just adding another status update thingy in tweet(self):
def tweet(self):
'''
Publishes Tweet with attached video
'''
request_data = {
'status': 'I just uploaded a video with the @TwitterAPI.',
'media_ids': self.media_id
}
req = requests.post(url=POST_TWEET_URL, data=request_data, auth=oauth)
print(req.json())
thread_data = {
'status': 'This tweet will be in reply to the video i just uploaded',
'in_reply_to_status_id': req.json()['id'],
'auto_populate_reply_metadata': True
}
req2 = requests.post(url=POST_TWEET_URL, data=thread_data, auth=oauth)
print(req2.json())
Should work, I believe?