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

Tweet posting with media_ids fails #46

Open
SKrPl opened this issue Jul 24, 2017 · 5 comments
Open

Tweet posting with media_ids fails #46

SKrPl opened this issue Jul 24, 2017 · 5 comments

Comments

@SKrPl
Copy link
Contributor

SKrPl commented Jul 24, 2017

Parent issue: #41

Steps to post a tweet with media:

  1. Obtain media ID using POST media/upload twitter API endpoint: https://dev.twitter.com/rest/reference/post/media/upload-init (Media ID is obtained for small files, without using APPEND and FINIALIZE command).
  2. Use the obtained media ID in statuses/update(https://dev.twitter.com/rest/reference/post/statuses/update) by providing the media ID in media_ids parameter. This request throws an HTTPException 400, and with an error message:
{"errors":[{"code":324,"message":"Invalid media id 889241623330263044"}]}

Tried to test the request with twurl and an Webapp developed by a twitter team member (http://django-rest-apis.herokuapp.com/media/video), both of it throw the same error (mentioned above).

Searched a bit about this and found the following discussions:

A demo app that can be used to verify this error, link: https://github.com/SKrPl/TwitterMultimedia

@SKrPl
Copy link
Contributor Author

SKrPl commented Jul 24, 2017

@mariobehling @Orbiter @sudheesh001 @daminisatya Please help. How should I proceed?

@abishekvashok
Copy link
Member

https://dev.twitter.com/rest/public/uploading-media

Supported image media types: JPG, PNG, GIF, WEBP
Image size <= 5 MB, animated GIF size <= 15 MB

@SKrPl
Copy link
Contributor Author

SKrPl commented Jul 24, 2017

@abishekvashok Yes, the image I tried was of JPG type and the size was 34KiB.

@abishekvashok
Copy link
Member

Twitter reject photos and videos that have less color in it.

@abishekvashok
Copy link
Member

Post media_id_string instead of media_id @SKrPI

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