Error publishing Tweet with more than 2 medias

Aug 12, 2015 at 11:27 AM
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.

It isn't urgent, but could you take a look?
Aug 12, 2015 at 11:54 AM
Hi Josh,

I am having a look into it. If there is a bug and I have enough time I will try to release a version tonight before I get AWOL.

Aug 13, 2015 at 10:49 AM
Hi Linvi,
Thanks for sorting, enjoy your holiday!
Aug 25, 2015 at 11:52 AM
You are welcome :)

I am closing this thread ;)
Marked as answer by linvi on 8/25/2015 at 3:52 AM