I have a simple page set up to pull photos from my picasa albums and output
some basic HTML.
Everything seems to be working fine. But I'm having trouble with the URL's
of the actual photos. They're proper locations are returned with
mediaGroup->content[0]->url. But they seem to be randomly working or not
working as sources for my img tags. The URL's are returned correctly every
time the script runs, and the resulting HTML reflects that. But for some
reason the full size images have a mind of their own. The thumbnails seem to
behave though. They show up every time. It's only the content URL's (full
size photos).
Here's my code...
$picasa = new Zend_Gdata_Photos();
$query = $picasa->newAlbumQuery();
$query->setUser('myUserName');
$query->setAlbumName('myAlbumName');
$feed = $picasa->getAlbumFeed($query);
foreach($feed as $num => $entry){
$photo_url = $entry->mediaGroup->content[0]->url;
$thumb_url = $entry->mediaGroup->thumbnail[2]->url;
$caption = $entry->summary;
$title = $entry->title->text;
echo '<div>'."\r\n";
echo ' '.$thumb_url.' <br />'."\r\n";
echo ' '.$photo_url.' <br />'."\r\n";
echo '</div>'."\r\n";
}
As you can see, it doesn't get much simpler. Please help.
*note: If I look at the source code from the resulting HTML page, it shows
the photo URL's. They're always correct and if pasted into the address bar
of a browser they show up.
Thanks for your help!
--
View this message in context: http://www.nabble.com/Zend_Gdata_Photos-problems...-tp22652642p22652642.html
Sent from the Zend gdata mailing list archive at Nabble.com.
没有评论:
发表评论