Here is my test PHP code (it uses TwitterOAuth library). At the end of execution it prints the json-response from server. When image posting was impossible, the response was: {“errors”:[{“code”:195,“message”:“Missing or invalid url parameter”}]}. Now the server returns the correct object.
<?php
DEFINE('ROOT', realpath(dirname(__FILE__)).'/');
require_once 'inc/keys.php';
require_once 'lib/twitteroauth/twitteroauth.php';
set_time_limit(120);
$toa = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_SECRET);
$toa->host = "https://api.twitter.com/1.1/";
$image = file_get_contents(FILE_PATH);
$ret = $toa->post('statuses/update_with_media', array('status' => 'Test message', 'media[]' => $image));
echo json_encode($ret) . "
\n";
?>