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

New Post: Error publishing Tweet with more than 2 medias

$
0
0
Hi Linvi,
I get an ArgumentException ("Cannot publish a tweet with more than 4 medias.") when I try to publish a Tweet with more than two media.

I'm putting the media into a PublishTweetOptionalParameters via the MediaBinaries property.

A quick look at the TweetInvi code and it looks like i'm running into the following in TqitterQueryValidator.ThrowIfTweetCannotBePublished
if ((mediaIds.Count() + parameters.MediaBinaries.Count()) > 4)
{
    throw new ArgumentException("Cannot publish a tweet with more than 4 medias.");
}
When I look at my instance of PublishTweetOptionalParameters when debugging, I see that setting MediaBinaries has also set MediaIds so each one gets counted twice.
Image

It isn't urgent, but could you take a look?
Cheers,
Josh

Viewing all articles
Browse latest Browse all 4126

Trending Articles



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