Scott Phillips
Scott Phillips

Reputation: 123

Using Zend GData library with OAuth and Picasa

I am trying to jus get something simple to work using the zend gdata library (for picasa) and some oauth credentials. So I have not idea if I'm passing in the OAuth stuff correctly, and whenever I go to create a gallery it fatals out trying to find '/Zend/Gdata/Photos/Extension/Title.php' which doesn't exist. Title does exist under App/Extension/Title.php. Not sure if it's related to how I'm adding in oauth, or if it's a problem with the autoloader....

$oauthOptions = array(
//'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER,
'version' => '2.0',
'signatureMethod' => 'HMAC-SHA1',
'consumerKey' => $CONSUMER_KEY,
'consumerSecret' => $CONSUMER_SECRET
);
$consumer = new Zend_Oauth_Consumer($oauthOptions);
$service = Zend_Gdata_Photos::AUTH_SERVICE_NAME;
$accessToken = new Zend_Oauth_Token_Access();
$accessToken->setToken('1/cIxUGEzJtHMt58coKjKEJBBRJV6KFinqpBXl8fX9OG_8');
$accessToken->setTokenSecret('Ykl2junbg06Uy5MncejtmKIy');

$httpClient = $accessToken->getHttpClient($oauthOptions);
$service = new Zend_Gdata_Photos($httpClient); //, "yourCompany-YourAppName-v1"
$entry = new Zend_Gdata_Photos_AlbumEntry();
$entry->setTitle($service->newTitle("test album"));
$service->insertAlbumEntry($entry);

Upvotes: 1

Views: 1098

Answers (1)

Related Questions