HI Manish here i am working oauth to request data from google but i cant convert authorization token into access token i am using zend framework my callback url data is
<?php require_once 'Zend/Oauth/Consumer.php'; $CONSUMER_KEY = '***********************'; $CONSUMER_SECRET = '****************************'; // Multi-scoped token. $oauthOptions = array( 'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER, 'version' => '1.0', 'consumerKey' => $CONSUMER_KEY, 'consumerSecret' => $CONSUMER_SECRET, 'signatureMethod' => 'HMAC-SHA1', 'callbackUrl' => 'http://techbits.co.in/mani/ind3.php', 'requestTokenUrl' => 'https://www.google.com/accounts/OAuthGetRequestToken ', 'userAuthorizationUrl' => ' https://www.google.com/accounts/OAuthAuthorizeToken', 'accessTokenUrl' => 'https://www.google.com/accounts/OAuthGetAccessToken' ); $consumer = new Zend_Oauth_Consumer($oauthOptions); if (!isset($_SESSION['ACCESS_TOKEN'])) {echo "in first if /br"; if (!empty($_GET) && isset($_SESSION['REQUEST_TOKEN'])) { echo "gotm".$_SESSION['REQUEST_TOKEN']; $_SESSION['ACCESS_TOKEN'] = serialize($consumer->getAccessToken($_GET, unserialize($_SESSION['REQUEST_TOKEN']))); } } echo "fine "; require_once 'Zend/Gdata/Docs.php'; if (isset($_SESSION['ACCESS_TOKEN'])) { $accessToken = unserialize($_SESSION['ACCESS_TOKEN']); } else { exit; } echo " till".$accessToken; /* Or, you could set an existing token (say one stored from your database). For HMAC-SHA1: $accessToken = new Zend_Oauth_Token_Access(); $accessToken->setToken('1/AQfoI-qJDqkvvkf216Gc2g'); $accessToken->setTokenSecret('2c26GLW250tZiQ'); */ $httpClient = $accessToken->getHttpClient($oauthOptions); echo "here"; $client = new Zend_Gdata_Docs($httpClient, "yourCompany-YourAppName-v1"); echo "almost over"; // Retrieve user's list of Google Docs $feed = $client->getDocumentListFeed(); foreach ($feed->entries as $entry) { echo "$entry->title\n"; } echo "done"; ?> can you tell me where i am doing wrong. On Wed, Mar 9, 2011 at 1:05 PM, dflorey <[email protected]> wrote: > Hi Alain, > thanks for the quick reply. > We are running our apps on App Engine. > We are using unsecured AuthSub and properly URLDecode the single use token. > We experience the problem on different Google Apps domains, others are > still working fine. > If you need any code snippets please let me know and contact me directly by > PM (daniel.florey at gmail.com) > > Thanks a lot, > > Daniel > > -- > You received this message because you are subscribed to the Google > Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html > -- You received this message because you are subscribed to the Google Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html
