我嘗試用圖形API此處上傳在Dailymotion視頻:錯誤試圖上傳Dailymotion上的視頻與圖形API時
http://www.dailymotion.com/doc/api/graph-api.html
與讀取成功驗證和寫入權限,但嘗試使用上傳視頻時下面API發佈方法:http://www.dailymotion.com/doc/api/graph-api.html#publishing得到錯誤
stdClass的對象([出錯] => stdClass的對象([代碼] => 400 [消息] =>的`URL」參數返回一個無效的內容類型:text/plain的,必須是視頻/ * [類型] => INVALID_PARAMETER))
我使用下面捲曲發佈請求API:
$fields = '';
$data = array(
"access_token" => $token,
"url" => "https://www.somesite.com/demo/dailymotion/X.mp4"
);
$url = "https://api.dailymotion.com/me/videos";
foreach($data as $key => $value) {
$fields .= $key . '=' . $value . '&';
}
rtrim($fields, '&');
$post = curl_init();
curl_setopt($post, CURLOPT_URL, $url);
curl_setopt($post, CURLOPT_POST, count($data));
curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($post);
curl_close($post);
print_r(json_decode($result));
有人請幫我解決這個問題。