Hello again:
I will try to shorten the story.
I am using secure=1 and session=1 (if i use secure=0 it works
perfectly)
Get the token.
Swap the token for the session token (then I am suppossed to be done
with the token stuff, right?). I store the sessionToken as a session
variable $_SESSION['SessionToken']
Then (doing the Calendar.php example, I try to invoque the
outputCalendarList($_SESSION['SessionToken']);
The outputCalendarList function is as follows:
function outputCalendarList($token)
{
$client = Zend_Gdata_AuthSub::getHttpClient($token);
$gdataCal = new Zend_Gdata_Calendar($client);
$calFeed = $gdataCal->getCalendarListFeed();
echo "<h1>" . $calFeed->title->text . "</h1>\n";
echo "<ul>\n";
foreach ($calFeed as $calendar) {
echo "\t<li>" . $calendar->title->text . "</li>\n";
}
echo "</ul>\n";
}
BUT, I keep getting the 401 error.
Debug Error: /sms/Zend/Gdata/App.php line 501 - Uncaught exception
'Zend_Gdata_App_HttpException' with message 'Expected response code
200, got 401
<HTML>
<HEAD>
<TITLE>Unknown authorization header</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Unknown authorization header</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
' in /var/www/html/sms/Zend/Gdata/App.php:501
Stack trace:
#0 /var/www/html/sms/Zend/Gdata.php(201): Zend_Gdata_App-
>performHttpRequest('GET', 'http://www.goog...', Array, NULL, NULL,
NULL)
#1 /var/www/html/sms/Zend/Gdata/App.php(610): Zend_Gdata-
>performHttpRequest('GET', 'http://www.goog...')
#2 /var/www/html/sms/Zend/Gdata/App.php(541): Zend_Gdata_App-
>get('http://www.goog...')
#3 /var/www/html/sms/Zend/Gdata/App.php(147): Zend_Gdata_App-
>importUrl('http://www.goog...', 'Zend_Gdata_Cale...')
#4 /var/www/html/sms/Zend/Gdata.php(148): Zend_Gdata_App-
>getFeed('http://www.goog...', 'Zend_Gdata_Cale...')
#5 /var/www/html/sms/Zend/Gdata/Calendar.php(98): Zend_Gdata-
>getFeed('http://www.goog...', 'Zend_Gdata_Cale...')
#6 /var/www/html/sms/O3OsPGfCxC7qpnBBQ.php(125): Zend_Gdata_Calendar-
>getCalendarEventFeed('http://www.goog...')
#7 /var/www/html/sms/O3OsPGfCxC7qpnBBQ.php(166):
outputCalendar('CO3OsPGfCxCd0bK...')
#8 /var/www/html/sms/O3OsPGfCxC7qpnBBQ.php(195): handlePrueba_1()
#9 {main}
thrown
Any ideas on what to check next?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---