Net-Twitter
Net-Twitter copied to clipboard
media_ids parameter should accept a list
According to the spec (https://dev.twitter.com/rest/reference/post/statuses/update), the media_ids
parameter of the update() call should take a list of media ID strings as its value.
In current Net::Twitter, if you wish only to attach a single piece of media to a new tweet, then you can set media_ids
to that media's value as a string, and it works fine. However, if you try to set media_ids
to an ArrayRef of any nonzero length (including one), Net::Twitter seems to interpret this as an attempt to refer to a file on-disk, and therefore usually dies with a no-such-file error.
Hey, Josh. Give Twitter::API a try. It's a rewrite of Net::Twitter that's much leaner and I just added the capability you need for media_ids
in version 0.0111.
I intend to deprecate Net::Twitter with Twitter::API replacing it. For most usages, it's a drop-in replacement. Just use Twitter::API->new_with_traits
(and adjust your traits list) where you currently use Net::Twitter->new
.
Have a look at the Migration trait for details about differences between the two distributions.