Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media_ids parameter should accept a list #73

Open
jmacdotorg opened this issue Mar 18, 2017 · 1 comment
Open

media_ids parameter should accept a list #73

jmacdotorg opened this issue Mar 18, 2017 · 1 comment

Comments

@jmacdotorg
Copy link
Contributor

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.

@semifor
Copy link
Owner

semifor commented Mar 19, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants