Hi Feris,

Since this is slightly tricky, I wrote a short tip with code you should be
able to use to force PHP to authenticate using the Google Account version of
your Apps e-mail:

http://gdatatips.blogspot.com/2008/10/force-php-to-use-google-account-in.html

Cheers,
-Jeff

On Fri, Oct 31, 2008 at 9:22 AM, Feris Thia <[EMAIL PROTECTED]>wrote:

> Hi Jeff,
> Thanks for your follow up. Below is my code snippet. It works for gmail
> account but not for Google account registered using Google Apps Gmail.
>
> ======================================
>  Zend_Loader::loadClass('Zend_Gdata');
>     Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
>     Zend_Loader::loadClass('Zend_Gdata_Photos');
>     Zend_Loader::loadClass('Zend_Http_Client');
>
> $serviceName = Zend_Gdata_Photos::AUTH_SERVICE_NAME;
> $username = "[EMAIL PROTECTED]";
>  $pass = "password";
>
> $client = Zend_Gdata_ClientLogin::getHttpClient($username, $pass,
> $serviceName);
>
> // update the second argument to be CompanyName-ProductName-Version
> $gp = new Zend_Gdata_Photos($client, "Google-DevelopersGuide-1.0");
>
> try {
>     $userFeed = $gp->getUserFeed("default");
>     foreach ($userFeed as $userEntry) {
>         echo $userEntry->title->text . "<br />\n";
>     }
> } catch (Zend_Gdata_App_HttpException $e) {
>     echo "Error: " . $e->getMessage() . "<br />\n";
>     if ($e->getResponse() != null) {
>         echo "Body: <br />\n" . $e->getResponse()->getBody() .
>              "<br />\n";
>     }
> } catch (Zend_Gdata_App_Exception $e) {
>     echo "Error: " . $e->getMessage() . "<br />\n";
> }
> ======================================
>
> Thanks,
>
> Feris
>
> On Fri, Oct 31, 2008 at 4:38 AM, Jeff Fisher (Google) <
> [EMAIL PROTECTED]> wrote:
>
>>
>> Hi Feris,
>>
>> That's odd, since there isn't an Apps version of Picasa to
>> authenticate to. Can you share the code snippet you are using to
>> authenticate (omitting your credentials, of course :)
>>
>> Cheers,
>> -Jeff
>>
>>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to