The APPEND command is used to upload a chunk (consecutive byte range) of
the media file. For example, a 3 MB file could be split into 3 chunks of
size 1 MB, and uploaded using 3 APPEND command requests. After the
entire file is uploaded, the next step is to call the FINALIZE command.
The FINALIZE command should be called after the entire media file is
uploaded using APPEND commands. If and (only if) the response of the
FINALIZE command contains a UploadFinalize.processinginfo field, it
may also be necessary to use a STATUS command and wait for it to return
success before proceeding to Tweet creation.
The INIT command request is used to initiate a file upload session. It
returns a mediaId which should be used to execute all subsequent
requests. The next step after a successful return from INIT command is
the APPEND command.
The STATUS command is used to periodically poll for updates of media
processing operation. After the STATUS command response returns
succeeded, you can move on to the next step which is usually create Tweet
with mediaId.