i have tried this code, bit receive this error:

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
message 'Expected response code 200, got 403 <HTML> <HEAD>
<TITLE>Cannot request contacts belonging to another user</TITLE> </
HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Cannot request
contacts belonging to another user</H1> <H2>Error 403</H2> </BODY> </
HTML> ' in /home/rat86/public_html/Gmail/library/Zend/Gdata/App.php:
644 Stack trace: #0 /home/rat86/public_html/Gmail/library/Zend/
Gdata.php(206): Zend_Gdata_App->performHttpRequest('GET', 'http://
www.goog...', Array, NULL, NULL, NULL) #1 /home/rat86/public_html/
Gmail/library/Zend/Gdata/App.php(782): Zend_Gdata->performHttpRequest
('GET', 'http://www.goog...', Array) #2 /home/rat86/public_html/Gmail/
library/Zend/Gdata/App.php(686): Zend_Gdata_App->get('http://
www.goog...', Array) #3 /home/rat86/public_html/Gmail/library/Zend/
Gdata/App.php(194): Zend_Gdata_App->importUrl('http://www.goog...',
'Zend_Gdata_Feed') #4 /home/rat86/public_html/Gmail/library/Zend/
Gdata.php(153): Zend_Gdata_App->getFeed('http: in /home/rat86/
public_html/Gmail/library/Zend/Gdata/App.php on line 644


my code is:

require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Gapps');
Zend_Loader::loadClass('Zend_Gdata_Query');

// Using Client Login
$client = Zend_Gdata_ClientLogin::getHttpClient
("[email protected]","*********", "cp");
$gdata = new Zend_Gdata($client);
$query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/contacts/
rat86%40gmail.com/full');
$query->setMaxResults(100);
$feed = $gdata->getFeed($query);

foreach ($feed as $entry) {
  $XMLContent = $entry->getXML();
  print_r( $XMLContent );
}


what is the error?
thanks








On 12 Nov 2008, 12:33, "Julian (Google)" <[email protected]> wrote:
> Hi,
>
> After the Authentication, you can use a Gdata_Query to get a
> Gdata_Feed with Gdata_Entries from the API.
>
> http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_Feed.htmlhttp://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_Entry.html
>
> require_once 'Zend/Loader.php';
> Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> Zend_Loader::loadClass('Zend_Gdata_Gapps');
> Zend_Loader::loadClass('Zend_Gdata_Query');
>
> // Using Client Login
> $client = Zend_Gdata_ClientLogin::getHttpClient("[email protected]",
> "PASSWORD", "cp");
> $gdata = new Zend_Gdata($client);
> $query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/contacts/
> USER%40domain.com/full');
> $query->setMaxResults(100);
> $feed = $gdata->getFeed($query);
>
> foreach ($feed as $entry) {
>   $XMLContent = $entry->getXML();
>   print_r( $XMLContent );
>
> }
>
> The variable $XMLContent, contains the XML information for each
> contact, because there isn't a specific Gdata_Entry for Contacts, you
> need to work with the XML directly.
>
> What other operations do you need to perform?
>
> Cheers,
> Julian.
>
> On Nov 6, 7:32 am, rchrd <[email protected]> wrote:
>
> > help!
>
> > I was able to have a success login using ClientLogin but what will I
> > do next? I'm onhttps://www.google.com/accounts/ClientLoginHowcan i
> > use the Auth? And placed it in a variable and make a new request. I'm
> > usingPHP.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts 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-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to