Thanks Manish for the response.
When i try to athenticate using
$user = "xxxxx";
$pass = "xxxxx";
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass,
$gcal);
$gcal = new Zend_Gdata_Calendar($client);
it works.
but when i try
$gcal = new Zend_Gdata_Calendar($http_client);
it does not work.
Can you please tell me how can i read events and add event to the
google calendar using OAuth ?
Thanks,
Vidya
On May 20, 11:39 am, Manish Pandit <[email protected]> wrote:
> On May 19, 10:36 pm, vidyahasten <[email protected]> wrote:
>
>
>
>
>
> > 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.
>
> Not very familiar with PHP or the Zend platform, but can you debug the
> outbound request (with something like tcpmon) and trace the HTTP
> request headers going out? In particular the "Authorization" header?
>
> -cheers,
> Manish- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---