我們正在創建一個網站,我們使用youtube api v3將視頻上傳到YouTube頻道問題是我想要當前上傳的視頻的YouTube視頻,以便我可以使用編號爲進一步使用.. 任何人都可以請幫忙。使用youtube api獲取當前上傳視頻的id v3
在此先感謝。
我們正在創建一個網站,我們使用youtube api v3將視頻上傳到YouTube頻道問題是我想要當前上傳的視頻的YouTube視頻,以便我可以使用編號爲進一步使用.. 任何人都可以請幫忙。使用youtube api獲取當前上傳視頻的id v3
在此先感謝。
您可以從上傳的「狀態」中找到它。
這裏的樣本:
https://github.com/youtube/api-samples/blob/master/php/resumable_upload.php#L113
只需插入下面的上傳文件
$htmlBody .= "<h3>Video Uploaded</h3><ul>"; $htmlBody .= sprintf('<li>%s (%s)</li>', $status['snippet']['title'], $status['id']); $htmlBody .= '</ul>';
後不要忘記setDefer設置爲false
$client->setDefer(false);
或者乾脆添加以下內容 $ video_key = $ status ['id']; echo $ video_key; – 2015-04-08 05:47:04
好你能詳細說明一下嗎?噸的代碼我得到的視頻ID ???????? – 2014-11-05 05:04:59
行號在鏈接中。 – 2014-11-05 05:09:27
謝謝....知道了.. :) :) – 2014-11-05 05:20:38