in_reply_to_status_id doesn't work with image upload


Getting Null when trying to reply with image…here is code.

This does not work:
$status = $connection->upload(‘statuses/update_with_media’, array(‘status’ => ‘@somehandle hello.’, ‘in_reply_to_status_id’ => 44344053334437440, ‘media[]’ => ‘@someimage.jpg’));


Any solution for this? I am also facing the same issue. Please post the solution if anybody has solved this issue…



I am not having a problem posting in_reply_to_status_id with media, do you have a sample Tweet that this failed for you? Can you send us the full request and our response?

Looks like you’re using a library. May be worth confirming no known issues with that lib around the update_with_media endpoint as well.


Hello jacob petrie,
Here is my code
$tmhOAuth = array( ‘consumer_key’ => CONSUMER_KEY, ‘consumer_secret’ => CONSUMER_SECRET, ‘user_token’ => OAUTH_TOKEN, ‘user_secret’ => OAUTH_TOKEN_SECRET, ‘curl_ssl_verifypeer’ => false );

$tmhOAuth = new tmhOAuth( $tmhOAuth );

$photo_path = ‘/opt/lampp/htdocs/RnD/socialInbox/uploads/1932198_664701136923863_1357889453_n.jpg’;
$photo_name = basename( $photo_path );
$photo_type = mime_content_type( $photo_path );

$code = $tmhOAuth->request(‘POST’, $tmhOAuth->url( ‘1.1/statuses/update_with_media’ ), array(
‘status’ => ‘@USERNAME TEST CONTENT’,‘in_reply_to_status_id’ => ‘XXXXXXXXXXXXXXXXXX’,
‘media[]’ => “@” . $photo_path . “;type={$photo_type};filename={$photo_name}”,
), true, true

Please let me know what I am doing wrong?