我可以成功发布消息。但是,当我尝试使用图表时,我会在响应中返回带有以下 URL 的成功代码 (200):
http://charts.stocktwits.com/production/large_.png http://charts.stocktwits.com/production/small_.png
当我尝试在 StockTwits 中查看消息时,我得到图像未找到 http://stks.co/p2kuK
我认为在 large_ 和 small_ 之后应该有一些代码;因此找不到图像。
由于 JSON 响应中没有返回错误,我认为一切正常。
链接到我正在使用 API 上传的图表:http: //tradescribe.com/images/performance_graphs/AStrakaus-3GTakeover-5day.png
有任何想法吗?
该消息出现在没有图表的 StockTwits 中,因此 API 调用看起来是正确的
代码
$postdata = array(
'access_token' => <TOKEN>,
'body' => <MESSAGE INFORMATION>,
'chart' => <FULLY QUALIFIED URL TO IMAGE>
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'https://api.stocktwits.com/api/2/messages/create.json',
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $postdata
));