将 Zend GData 库与 OAuth 和 Picasa 结合使用
我正在尝试使用 zend gdata 库(用于 picasa)和一些 oauth 凭据来获得一些简单的工作。所以我不知道我是否正确地传递了 OAuth 内容,每当我去创建一个画廊时,它都会在尝试查找不存在的“/Zend/Gdata/Photos/Extension/Title.php”时失败。标题确实存在于 App/Extension/Title.php 下。不确定这是否与我在 oauth 中添加的方式有关,或者是否是自动加载器的问题......
$oauthOptions = array(
//'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER,
'version' => '2.0',
'signatureMethod' => 'HMAC-SHA1',
'consumerKey' => $CONSUMER_KEY,
'consumerSecret' => $CONSUMER_SECRET
);
$consumer = new Zend_Oauth_Consumer($oauthOptions);
$service = Zend_Gdata_Photos::AUTH_SERVICE_NAME;
$accessToken = new Zend_Oauth_Token_Access();
$accessToken->setToken('1/cIxUGEzJtHMt58coKjKEJBBRJV6KFinqpBXl8fX9OG_8');
$accessToken->setTokenSecret('Ykl2junbg06Uy5MncejtmKIy');
$httpClient = $accessToken->getHttpClient($oauthOptions);
$service = new Zend_Gdata_Photos($httpClient); //, "yourCompany-YourAppName-v1"
$entry = new Zend_Gdata_Photos_AlbumEntry();
$entry->setTitle($service->newTitle("test album"));
$service->insertAlbumEntry($entry);
I am trying to jus get something simple to work using the zend gdata library (for picasa) and some oauth credentials. So I have not idea if I'm passing in the OAuth stuff correctly, and whenever I go to create a gallery it fatals out trying to find '/Zend/Gdata/Photos/Extension/Title.php' which doesn't exist. Title does exist under App/Extension/Title.php. Not sure if it's related to how I'm adding in oauth, or if it's a problem with the autoloader....
$oauthOptions = array(
//'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER,
'version' => '2.0',
'signatureMethod' => 'HMAC-SHA1',
'consumerKey' => $CONSUMER_KEY,
'consumerSecret' => $CONSUMER_SECRET
);
$consumer = new Zend_Oauth_Consumer($oauthOptions);
$service = Zend_Gdata_Photos::AUTH_SERVICE_NAME;
$accessToken = new Zend_Oauth_Token_Access();
$accessToken->setToken('1/cIxUGEzJtHMt58coKjKEJBBRJV6KFinqpBXl8fX9OG_8');
$accessToken->setTokenSecret('Ykl2junbg06Uy5MncejtmKIy');
$httpClient = $accessToken->getHttpClient($oauthOptions);
$service = new Zend_Gdata_Photos($httpClient); //, "yourCompany-YourAppName-v1"
$entry = new Zend_Gdata_Photos_AlbumEntry();
$entry->setTitle($service->newTitle("test album"));
$service->insertAlbumEntry($entry);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://www.dbjohn.com/2012/02/29/codeigniter- and-picasa-网络相册
试试这个
http://www.dbjohn.com/2012/02/29/codeigniter-and-picasa-web-albums
try this