Follow [Twitter's guidance](https://dev.twitter.com/rest/reference/post/media/upload-finalize) for media uploads: "If and (only if) the response of the FINALIZE command contains a processing_info field, it may also be necessary to use a STATUS command and wait for it to return success before proceeding to Tweet creation."pull/9121/merge
parent
51ff6009a3
commit
10c0744c4a
|
@ -116,6 +116,9 @@ class TwitterNotificationService(BaseNotificationService):
|
|||
self.log_error_resp(resp)
|
||||
return None
|
||||
|
||||
if resp.json().get('processing_info') is None:
|
||||
return callback(media_id)
|
||||
|
||||
self.check_status_until_done(media_id, callback)
|
||||
|
||||
def media_info(self, media_path):
|
||||
|
|
Loading…
Reference in New Issue