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('Autos');
..
$myVideoEntry->setVideoCategory('Gaming');
내가 얻을
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 업로드 양식의 드롭 다운 메뉴에서 게임이라는 단어를 복사하여 붙여 넣으려고했지만 아무런 소용이 없었습니다 (필사적이 아님).
누군가 이런 일이 발생하는 이유를 알고 있습니까?