I am the developer of Tweetinvi.
When the upload was implemented, the async was not part of the REST API.
But as I can read, this seems to be dependent on the media_category
.
Please try to set the media_category
to amplify_video
as followed.
var binary = File.ReadAllBytes("filepath");
var media = Upload.UploadVideo(binary, mediaCategory: "amplify_video");
Then use the Upload.GetMediaStatus
to know when the upload has successfully completed.
var status = Upload.GetMediaStatus(media);
if (status.ProcessingInfo.State == "succeeded")
{
// You can now publish your tweet
}
Documentation : https://github.com/linvi/tweetinvi/wiki/Upload#upload-status-video
Please note that Upload will be slightly improved in the next release of Tweetinvi (1.2).
Regardless of whether this solution works or not please let me know so that I can investigate and fix any potential bug or update the documentation.
Thanks