php - Getting video upload date with Zend Gdata Youtube API -
i'm trying list of videos specific user details video (title, desc., date, tags...) can pretty need, can't figure out how upload date. tried using getvideorecorded() , getrecorded(), both return nothing.
i can't seem find related on google, can find class references tell me have use getvideorecorded or getrecorded, nothing more.
am doing wrong? how can upload date?
current code:
$authenticationurl= 'https://www.google.com/accounts/clientlogin'; $httpclient = zend_gdata_clientlogin::gethttpclient( $username = $yt_username, $password = $yt_password, $service = 'youtube', $client = null, $source = '', // short string identifying application $logintoken = null, $logincaptcha = null, $authenticationurl); $yt = new zend_gdata_youtube($httpclient); $feed = $yt->getuseruploads($yt_username); foreach($feed $item) { echo "<div>"; echo "<h4>title: " . $item->getvideotitle() . "</h4>"; echo "<p>id: " . $item->getvideoid() . " | "; echo "upload date: " . $item->getvideorecorded() . "</p>"; echo "<p>description: " . $item->getvideodescription() . "</p>"; echo "<p>tags: " . implode(", ", $item->getvideotags()) . "</p>"; echo "</div>"; echo "<hr>"; }
you can try , extract < published > or < updated > tags following xml:
http://gdata.youtube.com/feeds/api/videos/{$videoid}
Comments
Post a Comment