Quantcast
Channel: Custom video thumbnails using YouTube API? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Custom video thumbnails using YouTube API?

$
0
0

How to upload custom thumbnails for an videos using php youtube-api .

I tried using Zend framework for youtube direct video upload which is working ,but i not able to find any custom thumbnails upload methods..

i tried the following code

 $parms = array('videoId => '' ,mediaUpload => '');$ch = curl_init();curl_setopt($ch, CURLOPT_URL, 'https://www.googleapis.com/upload/youtube/v3/thumbnails/set/');curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, $parms);curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Content-Type: image/jpeg", 'Authorization: Bearer '.$token['access_token']));$return = json_decode(curl_exec($ch));error thrown---------------{"error": {"errors": [   {"domain": "global","reason": "required","message": "Required parameter: videoId","locationType": "parameter","location": "videoId"   }  ],"code": 400,"message": "Required parameter: videoId" }}

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>