2009年3月22日星期日

Re: [fw-gdata] Zend_Gdata_Photos problems...

This is found wayyyy near the bottom of the FAQ:

http://code.google.com/apis/picasaweb/faq.html#embed_image

Basically, you need to request 800px or smaller images if you want to embed them. Larger than that and you'll have to proxy the request through your own server.

If you have any other problems/questions, you should join our Developer Forum:

http://groups.google.com/group/Google-Picasa-Data-API

Cheers,
-Jeff

On Sun, Mar 22, 2009 at 6:12 PM, NathanAlan <jacobs.123@gmail.com> wrote:

Also, you can check the actual page: http://bluestockingphoto.com/tmp/


NathanAlan wrote:
>
> Thanks in advance for any help, this is driving me crazy...
>
> 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 '&lt;div&gt;'."\r\n";
>       echo '&lt;img alt="'.$caption.'" title="'.$caption.'"
> src="'.$thumb_url.'" /&gt;&lt;br /&gt;'."\r\n";
>       echo '&lt;img alt="'.$caption.'" title="'.$caption.'"
> src="'.$photo_url.'" /&gt;&lt;br /&gt;'."\r\n";
>       echo '&lt;/div&gt;'."\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...-tp22652642p22652905.html
Sent from the Zend gdata mailing list archive at Nabble.com.


没有评论: