I’m using the media/upload entry point to upload a photo and then publish a tweet with this photo.
The media is uploaded successfully and I’m receiving media_id_string.
I then use the media_id_string to publish a tweet using the statuses/update entry point.
Sometimes I get the error “media parameter is invalid”
If I try to publish the same tweet with the same photo afterwards, I might succeed (the problem is not consistent)
Looking for the same issue in the forums I see only references to this error message when the photo is bigger then 3MB (which is not the case)
Any idea why this is happening? Do I need to add some kind of delay between the upload of the media and the creation of the status?