title: get gmail contacts Google Contacts API with javascript
body: <p>it always says The page you requested is invalid. 
  how can i fetch the contacts with javascript using google contacts api
  i have valid scope and Client ID    </p>
  
  <pre><code>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;
      }
  </code></pre>
  
  <p>i think there is something wrong with </p>
  
  <pre><code>  var token = google.accounts.user.checkLogin(scope);
              return token;
  </code></pre>
  
  <p><strong>token retuns ""(empty value here), how can i get the value of the token to get the contacts , plz help</strong></p>