开发者

Zend GData is driving me crazy

I'm working on a project to pull in album information from a us开发者_开发知识库er 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!


Figured it out.

I have to use getHttpClient in AuthSub to get the HTTP client associated with the session token!

Huzzah.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜