【发布时间】:2015-06-24 04:52:21
【问题描述】:
POST /statuses/retweet 给了我这个错误,而POST statuses/tweet 和 GET search/tweets 工作正常。
public $host = "https://api.twitter.com/1.1/";
$con = $this->oauth();
$retweets = $con->post('statuses/retweet/', array('id' => $searchid));
查询将获得对象的状态id_str。它是字符串格式。
/**
* POST wrapper for oAuthRequest.
*/
function post($url, $parameters = array()) {
$response = $this->oAuthRequest($url, 'POST', $parameters);
if ($this->format === 'json' && $this->decode_json) {
return json_decode($response);
}
return $response;
}
API 控制台没有给我任何错误:
https://api.twitter.com/1.1/statuses/retweet/{id}.json
【问题讨论】: