1
ブラウザベースのアップロード用のサンプルYouTube APIコードをコピーして貼り付けましたが、カテゴリを「ゲーム」に変更すると、エラー。ここで明らかに「ゲーム」は有効なYouTubeカテゴリではありません
サンプルコードです:
$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
$myVideoEntry->setVideoTitle('My Test Movie');
$myVideoEntry->setVideoDescription('My Test Movie');
// The category must be a valid YouTube category!
$myVideoEntry->setVideoCategory('Autos');
// Set keywords. Please note that this must be a comma-separated string
// and that individual keywords cannot contain whitespace
$myVideoEntry->SetVideoTags('cars, funny');
$tokenHandlerUrl = 'http://gdata.youtube.com/action/GetUploadToken';
$tokenArray = $yt->getFormUploadToken($myVideoEntry, $tokenHandlerUrl);
$tokenValue = $tokenArray['token'];
$postUrl = $tokenArray['url'];
しかし、私は
$myVideoEntry->setVideoCategory('Gaming');
に
$myVideoEntry->setVideoCategory('Autos');
を変更したときに私が得る..
Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 400 <?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:validation</domain><code>invalid_value</code><location type='xpath'>media:group/media:category[@scheme='http://gdata.youtube.com/schemas/2007/categories.cat']/text()</location></error></errors>
私はこれを唯一のエラーと認識しています。私は実際のYouTubeアップロードフォームのドロップダウンメニューから、ゲームという言葉をコピーして貼り付けようとしましたが、役に立たない(私は必死ではありません)。
これが起こっている理由を知りたい人はいますか?