2
我想用“照片URL”更新twitter状态。使用Twitter上传,update_with_media API和curl
这里是我的代码:
curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ci, CURLOPT_URL, 'https://upload.twitter.com/1/statuses/update_with_media.json');
curl_setopt($ci, CURLOPT_VERBOSE, FALSE);
curl_setopt($ci, CURLOPT_POSTFIELDS, array('media'=> '@http://sample.com/image.jpg', 'status'=>'This is a test image!'));
//'media' =>'@http://sample.com/image.jpg;type=image/jpeg;filename=image.jpg' doesn't work, too
$response = curl_exec($ci);
我也尝试使用apigee但没有成功click here to test it!
PS:我不想用tmhOAuth类!
我在找同样的东西,你找到了解决方案吗? – 2012-10-21 00:38:38
对此的任何解决方案?我看到它已经很老了,仍然没有答案... – tg2007 2014-05-16 23:49:28