[Solved] InvalidContent to try upload video with abraham library



hi community, in my script is impossible upload a video (your video.mp4 example of @abraham library), please, you can help me ?

my code :

$file_path = DIR . ‘/video.mp4’;
$result = $connection->upload(‘media/upload’, array(‘media’ => $file_path, ‘media_type’ => ‘video/mp4’), true);
var_dump($result );

this return

stdClass Object
    [request] => /1.1/media/upload.json
    [error] => InvalidContent.


Can you upload the file through the Twitter website? If so are you 100 % sure the file path is correct? If so please post a link to the video somewhere that won’t convert/compress it so I can try it out.


hi, in the web version is uploaded without problem.

this is my structure folder, my root folder is hely . … (screenshot). http://i.imgur.com/pSn0FF0.png

with the codebird library upload is successfull and you can view the video in @helymiguel

but i want use your library @abraham


the video is: http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4


wow ! sorry @abraham, i was confused . . .in the twitter web version not is possible upload …

message : Your media file is not compatible !

i try with a new video . . .

a question . . . . when i post a video , i can use in_reply_to_status_id ???


POST statuses/update supports multiple parameters including in_reply_to_status_id and media_ids.


yeah! solved ! thank you @abraham , the problem was in the video format

all fine (y)