Hi,

I use Oauth to access google calendar and use the reponse headers
which is $httpclient.

if ($request_token) {
  $data = array();
  $httpClient = new Zend_Gdata_HttpClient();
}
 $gcal = new Zend_Gdata_Calendar($httpClient);

    $query = $gcal->newEventQuery();
    $query->setUser('default');
    $query->setVisibility('private');
    $query->setProjection('basic');
    $query->setOrderby('starttime');
    if(isset($_GET['q'])) {
      $query->setQuery($_GET['q']);
    }
when i try to fetch the feed using

$feed = $gcal->getCalendarEventFeed($query);

i get a fatal error as shown below.

Fatal error: 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 C:\wamp\www\hybrid\Zend
\Gdata\App.php:699 Stack trace: #0 C:\wamp\www\hybrid\Zend\Gdata.php
(218): Zend_Gdata_App->performHttpRequest('GET', 'http://www.goog...',
Array, NULL, NULL, NULL) #1 C:\wamp\www\hybrid\Zend\Gdata\App.php
(860): Zend_Gdata->performHttpRequest('GET', 'http://www.goog...',
Array) #2 C:\wamp\www\hybrid\Zend\Gdata\App.php(753): Zend_Gdata_App-
>get('http://www.goog...', NULL) #3 C:\wamp\www\hybrid\Zend\Gdata
\App.php(204): Zend_Gdata_App->importUrl('http://www.goog...',
'Zend_Gdata_Cale...', NULL) #4 C:\wamp\www\hybrid\Zend\Gdata.php(161):
Zend_Gdata_App->getFeed('http://www.goog...', 'Zend_Gdata_Cale...') #5
C:\wamp\www\hybrid\Zend\Gdata\Calendar.php(106): Zend_Gdata->getFeed
('http://www.goog...', 'Zend_Gdata_Cale in C:\wamp\www\hybrid\Zend
\Gdata\App.php on line 699

I request you to kindly tell me how to fix this error as I need to
read and add events from/to google calendar.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OAuth" 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/oauth?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to