Get id of last created album in Picasa (gdata) PHP -



Get id of last created album in Picasa (gdata) PHP -

im trying insert photo on newly created album. couldnt find way on how lastly generated album id.

$entry = new zend_gdata_photos_albumentry(); $entry->settitle($gp->newtitle("test album")); $entry->setsummary($gp->newsummary("this album.")); $createdentry = $gp->insertalbumentry($entry);

from illustration on gdata:

$username = "default"; $filename = "c:/xampp/htdocs/test.jpg"; $photoname = "my test photo"; $albumid = "5626728515640093041"; : : // utilize albumquery class generate url album $albumquery = $gp->newalbumquery(); $albumquery->setuser($username); $albumquery->setalbumid($albumid); $insertedentry = $gp->insertphotoentry($photoentry, $albumquery->getqueryurl());

how can know lastly inserted album without typing manually?

thanks much!

have on http://code.google.com/intl/zh-tw/apis/picasaweb/docs/2.0/developers_guide_protocol.html#addalbums

picasa web albums creates new album using info sent, returns http 201 status code, along re-create of new album in form of "entry" element. returned entry similar 1 sent, returned 1 contains various elements added server, such "id" element.

therefore, can albumid parse returned entry.

gdata-api gdata picasa

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -