My example was slightly off. Instead of setWhere it should be
setGeoRssWhere:
$photoEntry->setGeoRssWhere($where);
Cheers,
-Jeff
On Dec 8, 11:57 am, "Harish B" <[EMAIL PROTECTED]> wrote:
> $service->enableRequestDebugLogging('/tmp/foo.txt');
>
> So i just create a file and add this line of code in my picasa photo upload
> file?
>
>
>
> On Mon, Dec 8, 2008 at 1:37 PM, Jeff Fisher <[EMAIL PROTECTED]> wrote:
> > Try increasing the error_reporting level on your PHP? Maybe it's set to
> > only log errors but not display them? You can also try request logging to
> > see what the library is sending and what it is getting back:
>
> >http://gdatatips.blogspot.com/2008/07/enable-request-debugging-in-php...
>
> > Cheers,
> > -Jeff
>
> > On Sat, Dec 6, 2008 at 1:53 PM, Harish B <[EMAIL PROTECTED]> wrote:
>
> >> Hi Jeff,
> >> When i add that code, the photo doesn't upload. It fails. I don't get any
> >> error message. Do i need to include anything?
>
> >> here is my code
> >> <?
> >> require_once 'Zend/Loader.php';
> >> Zend_Loader::loadClass('Zend_Gdata_Photos');
> >> Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> >> Zend_Loader::loadClass('Zend_Gdata_AuthSub');
>
> >> $username = "default";
> >> $filename = "../userpics/full/".$imagename.".".$filetype;
> >> $photoName = $album;
> >> $photoCaption = $caption;
> >> $photoTags = $tags;
> >> $albumId = "default";
> >> $fd = $gp->newMediaFileSource($filename);
> >> $fd->setContentType("image/jpeg");
> >> $photoEntry = $gp->newPhotoEntry();
> >> $photoEntry->setMediaSource($fd);
> >> $photoEntry->setTitle($gp->newTitle($photoName));
> >> $photoEntry->setSummary($gp->newSummary($photoCaption));
> >> $gp->registerPackage('Zend_Gdata_Geo');
> >> $gp->registerPackage('Zend_Gdata_Geo_Extension');
> >> $where = $gp->newGeoRssWhere();
> >> $position = $gp->newGmlPos("$lat $lng");
> >> $where->point = $gp->newGmlPoint($position);
> >> $photoEntry->setWhere($where);
> >> $keywords = new Zend_Gdata_Media_Extension_MediaKeywords();
> >> $keywords->setText($photoTags);
> >> $insertedEntry->mediaGroup->keywords = $keywords;
> >> $albumQuery = $gp->newAlbumQuery();
> >> $albumQuery->setUser($username);
> >> $albumQuery->setAlbumId($albumId);
> >> $insertedEntry = $gp->insertPhotoEntry($photoEntry,
> >> $albumQuery->getQueryUrl());
>
> >> -----====================END code=================
>
> >> On Wed, Nov 26, 2008 at 12:26 AM, Jeff Fisher (Google) <
> >> [EMAIL PROTECTED]> wrote:
>
> >>> Try doing something like
>
> >>> $gp->registerPackage('Zend_Gdata_Geo');
> >>> $gp->registerPackage('Zend_Gdata_Geo_Extension');
> >>> $where = $gp->newGeoRssWhere();
> >>> $position = $gp->newGmlPos('37.0 -122.0');
> >>> $where->point = $gp->newGmlPoint($position);
> >>> $photoEntry->setWhere($where);
>
> >>> Cheers,
> >>> -Jeff
>
> >>> On Nov 23, 10:53 am, hmb <[EMAIL PROTECTED]> wrote:
> >>> > Hi,
> >>> > How do i post latitude and longitude info along with photos?
>
> >>> > here is what i post now.
>
> >>> > $username = "default";
> >>> > $filename = "/tmp/photo.jpg";
> >>> > $photoName = "My Test Photo";
> >>> > $photoCaption = "The first photo I uploaded to Picasa Web Albums via
> >>> > PHP.";
> >>> > $photoTags = "beach, sunshine";
>
> >>> > // We use the albumId of 'default' to indicate that we'd like to
> >>> > upload
> >>> > // this photo into the 'drop box'. This drop box album is
> >>> > automatically
> >>> > // created if it does not already exist.
> >>> > $albumId = "default";
>
> >>> > $fd = $gp->newMediaFileSource($filename);
> >>> > $fd->setContentType("image/jpeg");
>
> >>> > // Create a PhotoEntry
> >>> > $photoEntry = $gp->newPhotoEntry();
>
> >>> > $photoEntry->setMediaSource($fd);
> >>> > $photoEntry->setTitle($gp->newTitle($photoName));
> >>> > $photoEntry->setSummary($gp->newSummary($photoCaption));
>
> >>> > HOW DO I INSERT LAT and LONG?
>
> >> --
> >> Harish B
> >> ==================================
> >> site:http://www.maufait.com
> >> site:http://www.mosnaps.com
> >> photos:http://www.mosnaps.com/harryb
> >> blog:http://www.harishb.com
> >> tel: 402-2030143
> >> twitter: @harry_b, @coolmobileapps
> >> ==================================
>
> --
> Harish B
> ==================================
> site:http://www.maufait.com
> site:http://www.mosnaps.com
> photos:http://www.mosnaps.com/harryb
> blog:http://www.harishb.com
> tel: 402-2030143
> twitter: @harry_b, @coolmobileapps
> ==================================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---