Hi, i trying to create a google reader cliente (for learning purposes)
using only Javascript.
I recently implement the authentication process using oAuth2 .. now i
try to read the unread contents for one user
I try to do with this url
http://www.google.com/reader/api/0/unread-count?allcomments=true&output=json&ck=1255643091105&client=scroll&callback=jsonCallback
This return with an error:
Uncaught SyntaxError: Unexpected token : unread-count:1
But if i see the response of the request i get:
{
max: 1000,
unreadcounts: [
{
id: "feed/
http://alt1040.com/feed",
count: 1,
newestItemTimestampUsec: "1333413832373842"
},
{
id: "user/01466548421704316440/label/Tech",
count: 7,
newestItemTimestampUsec: "1333417246139064"
}
]
}
I try to get using jQuery ajax call using JSONP...
$.ajax({
type:'GET',
url:'
http://www.google.com/reader/api/0/unread-count?
allcomments=true&output=json&ck=1255643091105&client=scroll&callback=jsonCallback',
data:'',
dataType:'jsonp',
contentType:'application/json; charset=utf-8',
crossDomain:true
});
Is there other way or a fix for this?
Thanks in advance..