I am using Youtube API to upload some video, but I can't figure out how to add uploaded video to specific playlist. I have searched all over Google and I haven't found any help at all.
I have read developers guide and I found this - https://developers.google.com/youtube/2.0/developers_guide_php#Adding_a_Playlist_Video, but I don't know how to define which video to which existing playlist I want the script to add.
This is what I use now to upload video:
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_YouTube');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
$developerKey = 'MYDEVKEY';
$applicationId = 'SOMEID';
$authenticationURL= 'https://www.google.com/accounts/ClientLogin';
$httpClient = Zend_Gdata_ClientLogin::getHttpClient(
$username = 'user',
$password = 'pass',
$service = 'youtube',
$client = null,
$source = 'something',
$loginToken = null,
$loginCaptcha = null,
$authenticationURL);
$clientId = 'something';
$yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId, $developerKey);
$videoName = "video/user_12345.mov";
$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
$filesource = $yt->newMediaFileSource($videoName);
$filesource->setContentType('video/quicktime');
$filesource->setSlug('video/test.mov');
$myVideoEntry->setMediaSource($filesource);
$myVideoEntry->setVideoTitle('Video title');
$myVideoEntry->setVideoDescription('Video description');
$myVideoEntry->setVideoCategory('Autos');
$myVideoEntry->SetVideoTags('car');
$uploadUrl ='https://uploads.gdata.youtube.com/feeds/users/default/uploads';
$newEntry = $yt->insertEntry($myVideoEntry, $uploadUrl, 'Zend_Gdata_YouTube_VideoEntry');
$state = $newEntry->getVideoState();
$idv = $newEntry->getVideoId();