开发者

PHP Zend GData Picasa/Photo Properties

I do not know if it is a global Zend property storage system or what, but when I create the following kind of code:

$serviceName = Zend_Gdata_Photos::AUTH_SERVICE_NAME;开发者_运维问答
$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");

$userFeed = $gp->getUserFeed("default");
foreach ($userFeed as $userEntry) {
    echo $userEntry->title->text . "<br />\n";
}

I cannot seem to get all of the attributes for the specified $userEntry. When I do print_r, it just gives me the structure of the element, not the actual data.

My question is how do I get a list containing items such as "title" for $userEntry?

Thanks a million in advance!


it's not exactly an answer, but have you tried to debug using the lines below?

} 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"; 
}
// In new versions of Zend Framework, you also have the option
// to print out the request that was made.  As the request
// includes Auth credentials, it's not advised to print out
// this data unless doing debugging
// echo "Request: <br />\n" . $e->getRequest() . "<br />\n";
} catch (Zend_Gdata_App_Exception $e) {
    echo "Error: " . $e->getMessage() . "<br />\n"; 
}

gl Paulo Bueno.

Edit: See also this post Zend_Gdata_Photos listing all albums and photos.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜