0
我想使用API更新Picasa網絡相冊中我的視頻的縮略圖。 我的Photos PHP sample code正在運行Photos數據API。使用Zend GData Picasa API更新Picasa視頻縮略圖
該文件說,我可以通過更新照片「Provide your own video thumbnail」。
我試過以下功能,但沒有任何反應。請幫忙!
/**
* Updates photo (for changing video thumbs
*
* @param Zend_Http_Client $client The authenticated client
* @param string $user The user's account name
* @param integer $albumId The album's id
* @param integer $photoId The photo's id
* @param array $photo The uploaded photo
* @return void
*/
function updatePhoto($client, $user, $albumId, $photoId, $photo)
{
$photos = new Zend_Gdata_Photos($client);
$photoQuery = new Zend_Gdata_Photos_PhotoQuery;
$photoQuery->setUser($user);
$photoQuery->setAlbumId($albumId);
$photoQuery->setPhotoId($photoId);
$photoQuery->setType('entry');
$entry = $photos->getPhotoEntry($photoQuery);
$fd = $photos->newMediaFileSource($photo["tmp_name"]);
$fd->setContentType($photo["type"]);
$entry->setMediaSource($fd);
$entry->save();
outputPhotoFeed($client, $user, $albumId, $photoId);
}