0

我不知道它是全局 Zend 属性存储系统还是什么,但是当我创建以下类型的代码时:

$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";
}

我似乎无法获得指定 $userEntry 的所有属性。当我执行 print_r 时,它只是给了我元素的结构,而不是实际的数据。

我的问题是如何获取包含 $userEntry 的“标题”等项目的列表?

提前一百万谢谢!

4

1 回答 1

0

这不完全是一个答案,但是您是否尝试过使用以下行进行调试?

} 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 保罗·布埃诺。

编辑:另见这篇文章Zend_Gdata_Photos 列出所有专辑和照片

于 2011-07-14T21:31:02.480 回答