javascript - Google Contacts API not returning output -
it working correctly, yesterday started giving 401. have tried google contacts api 401 error restclient::unauthorized
// handles click event, sends query function getsuccessoutput() { $.ajax({ url:'https://www.google.com/m8/feeds/contacts/default/full?access_token=ya29.xxxxxxxwlnlpsluuoifl1pu63cgg_dakeheh-vjjogbyzgjap65-rrriymibgnhiz5vwc6kpbpystaseobgxoaf0kmupqil_-rllkgjkph1uqtcjon4k1yzl7jdp-a&alt=json&max-results=9999', datatype: "jsonp", cache: true, complete: function (response) { $('#output').html(response.responsetext); }, error: function(xhr, status, error) { //var err = eval("(" + xhr.responsetext + ")"); alert(error.message); } }); return false; }
i don't think datatype correct. jsonp url must have "callback" parameter js function
take at: https://en.wikipedia.org/wiki/jsonp
also there "access_token" in url parameter can used once services. depends on endpoint talking , how handle authentication process.
Comments
Post a Comment