我试图在新创建的相册中插入照片。但我找不到如何获取最后生成的专辑 ID 的方法。
$entry = new Zend_Gdata_Photos_AlbumEntry();
$entry->setTitle($gp->newTitle("Test album"));
$entry->setSummary($gp->newSummary("This is an album."));
$createdEntry = $gp->insertAlbumEntry($entry);
从 gdata 上的示例:
$username = "default";
$filename = "C:/xampp/htdocs/test.jpg";
$photoName = "My Test Photo";
$albumId = "5626728515640093041";
:
:
// We use the AlbumQuery class to generate the URL for the album
$albumQuery = $gp->newAlbumQuery();
$albumQuery->setUser($username);
$albumQuery->setAlbumId($albumId);
$insertedEntry = $gp->insertPhotoEntry($photoEntry, $albumQuery->getQueryUrl());
如果不手动输入,我如何知道最后插入的专辑?
非常感谢!