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

The documentation for api.update_status() is incorrect for the media_ids parameter. #1235

Closed
mattccrampton opened this issue Jul 6, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@mattccrampton
Copy link

commented Jul 6, 2019

The documentation for api.update_status() is incorrect for the media_ids parameter...

http://docs.tweepy.org/en/latest/api.html#API.update_status

The documentation states...

media_ids – A comma-delimited list of media_ids to associate with the Tweet

But it should state...

media_ids – A list of media_ids to associate with the Tweet

The tweepy code is taking a native python list and converting it to a CSV string internally, and throws an error if it received a value that is not a list.

Doesn't work...

media = api.media_upload("william_gibson.jpg")
tweet = "Great scifi author or greatest scifi author? #williamgibson"
post_result = api.update_status(status=tweet, media_ids=media.media_id)

Does work...

media = api.media_upload("william_gibson.jpg")
tweet = "Great scifi author or greatest scifi author? #williamgibson"
post_result = api.update_status(status=tweet, media_ids=[media.media_id])

I can make a pull request to fix the issue if that's helpful.

@mattccrampton

This comment has been minimized.

Copy link
Author

commented Jul 6, 2019

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.