Ne error: Media sharing is only supported on managed mediaId(s)

video

#1

Hi,

I’m updating my app to support the new 140s video limit.

When I upload a video of less than 30s, it works. When it’s longer, I get this error:

Media sharing is only supported on managed mediaId(s).

What does that mean?

Note that I am using the async API, and I check that the upload has finished processing.


Video Too long on API?
Media sharing is only supported on managed mediaId(s)
#2

@ArcticWhiteness We deployed a bug fix yesterday which may have caused this problem. Please can you provide an example of failed mediaId(s) if this is still a problem for you?


#3

@tushargj I’m experiencing a similar issue, but with a different response error message. I get the “Duration too long, maximum:30000” message even though I am uploading using the suggested async method. The video is 12.6megs and 45s long. Any ideas what I might be doing wrong?

The log below includes the message as well as the failed MediaID: 750564825571426304

[3337:2915720] Twitter Stage1 HTTP Response: 202, responseData: {"media_id":750564825571426304,"media_id_string":"750564825571426304","expires_after_secs":86400}
[3337:2915720] chunk index -> 1, data size -> 5000000 bytes
[3337:2915720] chunk index -> 2, data size -> 5000000 bytes
[3337:2915720] chunk index -> 3, data size -> 2636231 bytes
[3337:2915720] stage one success, mediaID -> 750564825571426304
[3337:2915709] Twitter Stage2 - 1 HTTP Response: 204, 
[3337:2915720] Twitter Stage2 - 2 HTTP Response: 204, 
[3337:2915715] Twitter Stage2 - final, HTTP Response: 204, 
[3337:2915718] Twitter Stage3 HTTP Response: 201, {"media_id":750564825571426304,"media_id_string":"750564825571426304","size":12636231,"expires_after_secs":86400,"video":{"video_type":"video\/mp4"}}
[3337:2915867] Twitter Stage4 HTTP Response: 400, {"errors":[{"code":324,"message":"Duration too long, maximum:30000, actual:45205 (MediaId: snf:750564825571426304)"}]}

Thanks!


#4

@corwinderkatch Thanks for including log messages. It looks like you are not passing the media_category param which is required for longer videos (> 30 seconds).


#5

@tushargj Thank you for the super fast reply!!! Yes, that was it, I actually solved it last night by being lucky enough to come across this post about the same issue. I guess it would probably save devs a lot of time and frustration if this detail was mentioned in the Media API docs alongside the 140 seconds (async) requirement – and having the media_category enums there as well :slight_smile:

Thanks again!


Media Upload API does not allow video more than 30 seconds
#6

@corwinderkatch Sorry for the trouble. We will follow your suggestions and make it right soon :grinning: #helloworld.


#7

Awesome :thumbsup: thanks again for the support and quick replies.


#8