如何从钛谷歌日历中读取事件

时间:2014-03-21 10:29:46

标签: titanium google-calendar-api

我正在为IOS / Android开发一个应用程序,我需要从谷歌日历中读取事件。我开始使用OAuth 2.0 for titanium并获得访问令牌,但我想如何使用此访问令牌获取日历和事件列表。

我试过了: -

var url = "https://www.googleapis.com/calendar/v3/users/me/calendarList?access_token = "+accessToken;
       var xhr = Ti.Network.createHTTPClient({
            onload: function(e) {
              var calendar = JSON.parse(this.responseText);
                Ti.API.debug(this.responseText);

            },
            onerror: function(e) {
                Ti.API.debug(e.error);
                alert('error');
            },
            timeout:15000
        });

        xhr.open("GET", url);
        xhr.send();

它给我"需要身份验证"错误。

任何帮助? 在此先感谢

0 个答案:

没有答案
相关问题