I installed Zend Gdata 1.11.2 but I don't see anything in it labeled OAuth... does it support OAuth?
Does Zend Gdata Support OAuth?
3.5k views Asked by John At
4
There are 4 answers
0
On
No, it currently doesn't.
We integrate with a Google Documents for example, and all we can use currently is AuthSub. I haven't checked every line of code in there, but I think it's outdated in this respect. Of course we could create our own wrapper using OAuth, but this defeats the purpose of the framework for me.
Also, when you check out Google's examples, they tell you to use Zend_Oauth as well:
http://code.google.com/apis/gdata/docs/auth/oauth.html#Examples (click on "PHP")
0
On
I do it like this, for Docs, Calendar, and Picasa:
$oauthOptions = array(
'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER,
'version' => '1.0',
'signatureMethod' => 'HMAC-SHA1',
'consumerKey' => $CONSUMER_KEY,
'consumerSecret' => $CONSUMER_SECRET
);
$consumer = new Zend_Oauth_Consumer($oauthOptions);
$token = new Zend_Oauth_Token_Access();
$httpClient = $token->getHttpClient($oauthOptions,null);
$service = new Zend_Gdata_Photos($httpClient); //OR WHATEVER CLASS U WANT
...and then run your GData calls as normal through $service.
For OAuth there is seprate ZF component: Zend_OAuth.