Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Chunked upload support?

$
0
0
Here is a very simple example;
var binary = newbyte[10];
var tweetWithMedia = Tweet.CreateTweetWithMedia("hello", binary);
tweetWithMedia.AddMedia(binary2);
var success = tweetWithMedia.Publish();
You can also add a media as a clone. This will reupload the media but it will make sure that the media has not been used for 2 publication (which is not authorized by the Twitter REST API).
var media = Upload.UploadBinary(binary);
tweetWithMedia.AddMediaAsAClone(media);
I don't remember the reason I decided to not directly authorize developers to AddMedia from a media object without cloning it. I guess I wanted to make sure the operation did not fail.

What do you think about this decision?

Cheers,
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>