它总是说您请求的页面无效.我如何使用谷歌联系人api获取联系人我有有效的范围和客户端ID
google.load('gdata', '2.x'); debugger google.setOnLoadCallback(function () { if (window.location.hash == "") { if (!checkLogin()) { logMeIn(); } else { var feedUrl = "https://www.google.com/m8/feeds/contacts/default/full"; query = new google.gdata.contacts.ContactQuery(feedUrl); query.setMaxResults(5000); myService = new google.gdata.contacts.ContactsService('exampleCo-exampleApp-1.0'); myService.getContactFeed(query, function (result) { document.cookie = "g314-scope-0="; window.opener.parseGmailContacts(result.feed.entry); close(); }, function (e) { alert(e.cause ? e.cause.statusText : e.message); }); } } }); function logMeIn() { scope = "https://www.google.com/m8/feeds"; var token = google.accounts.user.login(scope); } function logMeOut() { google.accounts.user.logout(); } function checkLogin() { scope = "https://www.google.com/m8/feeds/"; var token = google.accounts.user.checkLogin(scope); return token; }
我认为有问题
var token = google.accounts.user.checkLogin(scope); return token;
令牌返回""(此处为空值),如何获取令牌的值以获取联系人,PLZ帮助