[英]Using OAuth with Google Calendar API PHP library
The Google Calendar API version 1 PHP library only contains example code for AuthSub. Google Calendar API版本1 PHP库仅包含AuthSub的示例代码。 If I wanted to use OAuth, is that possible?
如果我想使用OAuth,可以吗?
您应该遵循: http : //code.google.com/apis/accounts/docs/OAuth.html并使用一些php lib来处理OAuth1.0,我知道有些开发人员使用过: http : //code.google。 com / p / oauth-php /
I have been able to use OAuth with Google Calendar API PHP library keep in mind these changes were required to achieve this: 我已经能够将OAuth与Google Calendar API PHP库一起使用,请记住,要实现此目标,需要进行以下更改:
Within the OAuth options array that you pass to the Zend_Oauth_Consumer: 在传递给Zend_Oauth_Consumer的OAuth选项数组中:
'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER had to be changed to 'requestScheme' => Zend_Oauth::REQUEST_SCHEME_QUERYSTRING 'requestScheme'=> Zend_Oauth :: REQUEST_SCHEME_HEADER必须更改为'requestScheme'=> Zend_Oauth :: REQUEST_SCHEME_QUERYSTRING
and within the Zend_Gdata_Calendar class 在Zend_Gdata_Calendar类中
const CALENDAR_EVENT_FEED_URI = 'http://www.google.com/calendar/feeds/default/private/full';
had to be changed to const CALENDAR_EVENT_FEED_URI = 'https://www.google.com/calendar/feeds/default/private/full'; 必须更改为const CALENDAR_EVENT_FEED_URI ='https://www.google.com/calendar/feeds/default/private/full';
as we were requesting the Data from a HTTPS page, and the protocols had to line up. 当我们从HTTPS页面请求数据时,协议必须排队。
Ben. 本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.