0
我想使用客戶端庫v3將視頻上傳到youtube。使用php客戶端庫v3將視頻上傳到youtube
第3版庫是實驗和不具有多文檔 (提供不包括YouTube的樣品)
我已經正確認證的用戶使用OAuth 2.0。當我有訪問令牌時,我正在嘗試使用此代碼。
if ($client->getAccessToken()) {
$snippet = new Google_VideoSnippet();
$snippet -> setTitle = "Demo title";
$snippet -> setDescriptio = "Demo descrition";
$snippet -> setTags = array("tag1","tag2");
$snippet -> setMimeType = 'video/quicktime';
$video = new Google_Video();
$video -> setSnippet($snippet);
// Not sure what to do now....
$_SESSION['access_token'] = $client->getAccessToken();
}
從docs,
我需要提供部分參數
The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.
The part names that you can include in the parameter value are snippet, contentDetails, player, statistics, status, and topicDetails. However, not all of those parts contain properties that can be set when setting or updating a video's metadata. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.
但是缺乏足夠的文件,除了它,我無法理解一個Python的例子。 (例子是在鏈路的底部,我公司提供)
請,不給例子/鏈接Zend庫,它使用的auth-子,我不想。 我想使用oauth 2.0。
哦檢出源,我只注意到代碼已經有2天前更新。我剛剛檢查出來。讓我試試,我會告訴你,一旦我測試 – Jashwant
工作,我使用的是舊版本(發佈版本),它沒有任何方法'插入' – Jashwant