fbpx

test

[insert_php]
$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL,’http://distilleryimage11.s3.amazonaws.com/d8f7dc28825b11e180d51231380fcd7e_7.jpg’);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_USERAGENT, ‘Your application name’);
$image = curl_exec($curl_handle);
curl_close($curl_handle);

$code = $tmhOAuth->request(‘POST’, ‘https://upload.twitter.com/1/statuses/update_with_media.json’,
array(
‘media[]’ => $image,
‘status’ => “Test uploading.”.time() // Don’t give up..
),
true, // use auth
true // multipart
);
[/insert_php]