Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I've got my session with the valid token that i set up this way :

$session_token = Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']);
// Store the session token in our session.
$_SESSION['cal_token'] = $session_token;

Then i want to be able to do this:

$service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
$docs = new Zend_Gdata_Docs($client);
$feed = $docs->getDocumentListFeed();

But using the token. Instead of the authentication with user/pass/service

I already looked at some example of this but i didn't find any way to make it work.

Thank you everyone!

share|improve this question
1  
What have you tried? – Liyali Apr 21 '12 at 3:27
Liyali I just don't know how to do it, and i've really looked before asking this :/ – Jerome Ansia Apr 23 '12 at 15:20

1 Answer

up vote 3 down vote accepted
    // Retrieve user's list of Google Docs
    $client = Zend_Gdata_AuthSub::getHttpClient($_SESSION['cal_token']);
    $docs = new Zend_Gdata_Docs($client);
    $feed = $docs->getDocumentListFeed();
    foreach ($feed->entries as $entry) {
      echo "$entry->title\n";
    }
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.