esh
esh

Reputation: 104

PHP:Youtube API thumbnails.set

whenever i run this one i get an error saying

Undefined property: Google_YouTubeService::$thumbnails Fatal error: Call to a member function set() on a non-object

$searchResponse= $youtube->thumbnails->set("videoId",array('mediaUpload'=>$media, 'videoId'=>'CAc2JyONesI'));

what's wrong?

Upvotes: 0

Views: 246

Answers (2)

Ibrahim Ulukaya
Ibrahim Ulukaya

Reputation: 12877

Your call should be like

$setResponse = $youtube->thumbnails->set("YOUR_VIDEO_ID", array('mediaUpload' => $media));

Besides that, you may have initialized $youtube object wrong, check with the sample answer.

Most likely you are using an older version of the client library, that doesn't have Thumbnails class in it. Please download latest library from here.

Upvotes: 1

Ren Camp
Ren Camp

Reputation: 440

Thumbnails object (Side note, I realized latest library built doesn't have thumbnails object in it, will update it as soon as we can.) -Ibrahim Ulukaya

I need this too. When will the library be updated?

Upvotes: 0

Related Questions