Hello,
We are having a strange issue where a post will fail when regularly processed. However, if we step through the code slowly to try and diagnose the issue we notice that it will resolve completely so it seems like it may have to do with the speed at which calls are being made to the API.
We are uploading a video which is a multi-step process:
Initial API call to start video upload:
https://upload.twitter.com/1.1/media/upload.json
parameters:
additional_owners: 368230671
media_category: "tweet_video"
command: "INIT"
media_type: "video/mp4"
total_bytes:{video size in bytes}
API call to upload video data to:
https://upload.twitter.com/1.1/media/upload.json
parameters:
command: "APPEND"
media_id:{id returned from initial api call}
segment_index: {section of video being uploaded}
API call to finish upload:
https://upload.twitter.com/1.1/media/upload.json
parameters:
command: "FINALIZE"
media_id: {id returned from initial api call}
API call to check processing status until complete:
https://upload.twitter.com/1.1/media/upload.json
parameters:
command: "STATUS"
media_id: {id returned from initial api call}
API call to post:
https://api.twitter.com/1.1/statuses/update.json
parameters:
status: "Match night is approaching and it’s your time to be the hero - stock up on your cold ones and be part of the action. #ShareTheDrama"
media_ids: {id from video upload}
I have uploaded the video being used to dropbox so you can use it to test: https://www.dropbox.com/s/daqh0zyp305gcox/202384.mp4?dl=0