Zend GData 让我发疯
我正在开发一个项目,在使用 AuthSub 进行身份验证后从用户那里提取专辑信息。我一生都无法弄清楚如何提取与默认经过身份验证的用户关联的所有相册的列表。
当我调用 getAuthSubTokenInfo 时,我得到 ..
Target=dev.mywebsite.com Secure=false Scope=http://picasaweb.google.com/data
这是在调用 getAuthSubSessionToken 从第一次身份验证后给出的临时令牌中获取会话令牌之后。
当我调用 getAlbumFeed .. 时,
$gdata_photos = new Zend_Gdata_Photos();
$query = $gdata_photos->newAlbumQuery();
$query->setUser("default");
$query->setAlbumName("big");
var_dump($gdata_photos->getAlbumFeed($query));
我得到了这个结果。
Expected response code 200, got 403 Authorization required
在 Album 类中,我无法提供会话令牌,并且无法获取经过身份验证的用户的用户名以直接引用。据我所知,就 AuthSub 而言,我有一个经过身份验证的会话,但“照片”无法识别它。
任何人都有使用 GData 的经验,或者特别是在 CodeIgniter 中使用 Zend GData 库的经验吗?
所有这一切的最终目标是能够在不提前知道用户/相册名称的情况下提取相册和照片列表。
谢谢!
I'm working on a project to pull in album information from a user after authenticating using AuthSub. I cannot for the life of me figure out how to pull a list of all the albums associated with the default authenticated user.
When I call getAuthSubTokenInfo I get ..
Target=dev.mywebsite.com Secure=false Scope=http://picasaweb.google.com/data
This is after calling getAuthSubSessionToken to get a session token from the temporary token given after first authenticating.
When I call getAlbumFeed ..
$gdata_photos = new Zend_Gdata_Photos();
$query = $gdata_photos->newAlbumQuery();
$query->setUser("default");
$query->setAlbumName("big");
var_dump($gdata_photos->getAlbumFeed($query));
I get this as a result.
Expected response code 200, got 403 Authorization required
Nowhere in the Album class can I supply a session token, and I am unable to get the username of the authenticated user to reference directly. As far as I can tell, I have an authenticated session as far as AuthSub is concerned, but Photos isn't recognizing it.
Anyone have any experience with GData, or specifically using the Zend GData libraries in CodeIgniter?
The end goal of all of this is to be able to pull in a list of albums and photos without knowing the user/album names in advance.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
想通了。
我必须在 AuthSub 中使用 getHttpClient 来获取与会话令牌关联的 HTTP 客户端!
万岁。
Figured it out.
I have to use getHttpClient in AuthSub to get the HTTP client associated with the session token!
Huzzah.