1
私はこれをやって、その作成の時にプレイリストのサムネイルを設定しようとしている:phpのyoutube apiでプレイリストのサムネイルを設定するには?
// 1. Create the snippet for the playlist. Set its title and description.
$playlistSnippet = new Google_Service_YouTube_PlaylistSnippet();
$playlistSnippet->setTitle('Test Playlist ' . date("Y-m-d H:i:s"));
$playlistSnippet->setDescription('A private playlist created with the YouTube API v3');
$playlistSnippet->setThumbnails ('https://www.google.co.ve/url?sa=i&rct=j&q=&esrc=s&source=imgres&cd=&cad=rja&uact=8&ved=0ahUKEwidvaDtwbPTAhVhKpoKHWf5CboQjRwIBw&url=http%3A%2F%2Fimagenesbonitas.bosquedefantasias.com%2F&psig=AFQjCNHfcV6nKOO6oU7iwv3LCfb6GBFkAg&ust=1492794187290336');
が、問題は、プレイリストのサムネイルがあるということである。
"thumbnails": {
(key): {
"url": string,
"width": unsigned integer,
"height": unsigned integer
}
このようにオブジェクトを作成してスニペットオブジェクトに追加する方法はわかりません。
画像のURLにブロブ画像を使用できますか? – Mvram
blobデータを 'url'フィールドに入れることを意味しますか?私はこれが有効なURLを期待しているが動作するとは思わないが、試すことができる –
BLOB形式では動作しない。 Btw、$ playlistSnippet-> setThumbnails(thumbnailDetails); - >あなたは記号 '$'を忘れました。しかし、本当にありがとう、これは私のために働く。これらの機能を参照できるページはありますか? – Mvram