Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 666017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:46:21+00:00 2026-05-13T23:46:21+00:00

So, I figured out how to get an access token from Google using the

  • 0

So, I figured out how to get an access token from Google using the Zend_Oauth library in 1.10. Now lets say I want to get my contacts…

  $config = array(
      'consumerKey' => 'zzz',
      'signatureMethod' => 'HMAC-SHA1',
'consumerSecret' => 'xxx'
  );

  $token = unserialize($_SESSION['GOOGLE_ACCESS_TOKEN']);


$client = $token->getHttpClient($config);
$client->setMethod(Zend_Http_Client::GET);
// $client->setParameterGet('max-results', '10000');

$gdata = new Zend_Gdata($client);
$gdata->setMajorProtocolVersion(3);

$query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/contacts/default/full');

// $query->MaxResults=100;

$feed = $gdata->getFeed($query);

$feed is a lovely object with 25 contacts. But if I want to get more in a single pull, there doesn’t seem to be a way of specifying max results that works.

If I uncomment client->setParameterGet it’s ignored. It works if I specify $client->setUri and use $rawdata = client->request() to get the response, but then other issues crop up with handling the feed data that comes back… like getting it into GData for easy handling.

I’ve tried $feed = $gdata->importString($rawdata->getBody()) but while $rawdata->getBody() returns what seems to be valid XML, $feed->totalResults throws an error, while it wouldn’t if I used $gdata->getFeed($query).

If I uncomment $query->MaxResults=100; use $gdata->getFeed($query) Google returns a 401 with “Unknown authorization header”.

So is it possibly to specify parameters while using Zend_GData with an Oauth token? Or am I going to have to build my own requests, then use Zend_Feed (or some other XML/Feed dissector) for parsing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:46:22+00:00Added an answer on May 13, 2026 at 11:46 pm

    It’s a bit tricky mixing a process meant to work with AuthSub with OAuth. I did some digging. So far I can get it to download all my contacts like this…

    $client = $token->getHttpClient($config);
    $client->setMethod(Zend_Http_Client::GET);
    $client->setUri('http://www.google.com/m8/feeds/contacts/default/full/');
    $client->setParameterGet('max-results', '10000');
    $client->setParameterGet('v','3');
    $bfeed = $client->request();
    

    Looks like the primary difference between us is I specify the Feed URL in the $client->setUri('http://www.google.com/m8/feeds/contacts/default/full/'); and set my version differently. But I can get the body() property of $bfeed and it gives me 245k of XML to dissect.

    My problem is that when I’m pulling down a single contact’s feed via this method, I was getting an error.

    I, like you, am trying to figure this out, so please reply with anything that works for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to figure out how to get the data from D3D textures and
I can't figure out how to get the SCOPE_IDENTITY() back to my variables from
I figured out through trial n error how to link an unmanaged static library
Greetings, Using the Facebook API, I have obtained an OAuth access token for a
I'm using the Graph API, but I can't figure out how to get a
Bah, vbscript. I'm trying to figure out how to get this statement to work:
Trying to figure out an equation to get the current group a page would
Sometimes I get Oracle connection problems because I can't figure out which tnsnames.ora file
I've figured out how to set VC++ to compile code into a .lib file
So I figured out that by adding the ResetWebServer=FALSE attribute to the solution manifest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.