Hi alexsinger,
Thank your for your response.I followed your instructions and I was able to requesti INIT method, I get the media_id response but when I call APPEND method I get "Invalid command HTTP error 400"
Code snippets:
@Multipart
@POST("https://upload.twitter.com/1.1/media/upload.json")
void uploadVideoAppend(@Part("command") String command,
@Part("media_id") String mediaId,
@Part("segment_index") String segmentIndex,
@Part("media") RequestBody media
);
requestBody = new RequestBody() {
@Override
public MediaType contentType() {
return MediaType.parse("video/mp4");
}
@Override
public void writeTo(final BufferedSink sink) throws IOException {
sink.write(data, 0, fileSize);
}
};
apiService.uploadVideoAppend("APPEND", String.valueOf(mediaId), String.valueOf(0), requestBody)