and do i have to put entire framework on my sever or just framework library
will do
and after applying some more p&c
i am having this error now
*Fatal error*: Uncaught exception 'Zend_Gdata_App_HttpException' with
message 'Expected response code 200, got 401 <HTML> <HEAD> <TITLE>Token
invalid - AuthSub token has wrong scope</TITLE> </HEAD> <BODY
BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Token invalid - AuthSub token has
wrong scope</H1> <H2>Error 401</H2> </BODY> </HTML> ' in
/home/techbits/public_html/mani/Zend/Gdata/App.php:709 Stack trace: #0
/home/techbits/public_html/mani/Zend/Gdata.php(221):
Zend_Gdata_App->performHttpRequest('GET', 'http://docs.goo...', Array, NULL,
NULL, NULL) #1 /home/techbits/public_html/mani/Zend/Gdata/App.php(875):
Zend_Gdata->performHttpRequest('GET', 'http://docs.goo...', Array) #2
/home/techbits/public_html/mani/Zend/Gdata/App.php(763):
Zend_Gdata_App->get('http://docs.goo...', NULL) #3
/home/techbits/public_html/mani/Zend/Gdata/App.php(205):
Zend_Gdata_App->importUrl('http://docs.goo...', 'Zend_Gdata_Docs...', NULL)
#4 /home/techbits/public_html/mani/Zend/Gdata.php(162):
Zend_Gdata_App->getFeed('http://docs.goo...', 'Zend_Gdata_Docs...' in *
/home/techbits/public_html/mani/Zend/Gdata/App.php* on line*709*
*
*
*
*
*
*
*
*
*
*
*and my code for callback page is *
*
*
*
*
*
*
*
*
*
*
*
*
*
<?php
require_once 'Zend/Oauth/Consumer.php';
session_start();
global $_SESSION;
$CONSUMER_KEY = 'techbits.co.in';
$CONSUMER_SECRET = '7UF/rKCUH/O7S9Crl40nxVOX';
// Multi-scoped token.
$SCOPES = array(
'https://docs.google.com/feeds/',
'https://spreadsheets.google.com/feeds/'
);
$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/ind2.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['ACCESS_TOKEN'] = serialize($consumer->getAccessToken($_GET,
unserialize($_SESSION['REQUEST_TOKEN'])));
}
}
require_once 'Zend/Gdata/Docs.php';
if (isset($_SESSION['ACCESS_TOKEN'])) {
$accessToken = unserialize($_SESSION['ACCESS_TOKEN']);
} else {
exit;
}
/* 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);
$client = new Zend_Gdata_Docs($httpClient, "yourCompany-YourAppName-v1");
// Retrieve user's list of Google Docs
$feed = $client->getDocumentListFeed();
foreach ($feed->entries as $entry) {
echo "$entry->title\n";
}
?>
*
--
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