views:

146

answers:

2

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!

+1  A: 

Figured it out.

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

Huzzah.

mmazing
A: 

Hi, were you able to get the client username after authentication? I've searched everywhere but I didn't find how to retrive de client username and if possible the avatar. Please help me if you have any ideea. Thank you

Laura