Mayur Kumar Dwivedi
Mayur Kumar Dwivedi

Reputation: 1

Uploading media to twitter fails

I am using upload media through twitter API

https://upload.twitter.com/1.1/media/upload.json it’s showing success when uploading image

{“media_id”:1126023933537292288,“media_id_string”:“1126023933537292288”,“size”:108365,“expires_after_secs”:86400,“image”:{“image_type”:“image/jpeg”,“w”:752,“h”:960}}

but

https://upload.twitter.com/1.1/media/upload.json?command=STATUS&media_id=1126023933537292288

giving me

{
“request”: “/1.1/media/upload.json”,
“error”: “Invalid mediaId.”
}

How to solve it?

Upvotes: 0

Views: 381

Answers (1)

osowskit
osowskit

Reputation: 6334

If the upload didn't return an error message, it should be available to use. As answered here, the STATUS command is only necessary for video uploads.

You should only call STATUS command if FINALIZE response contains processing_info field

Upvotes: 1

Related Questions