I'm writing a Google Chrome extension for users to monitor their Stack Overflow account and notify them of new reputation, but I'm having problems with the JSON request to access the rep data. I'm using JQuery as my JSON library.
Using the address: http://stackoverflow.com/users/rep/{userid}/{from-time}/{to-time} where the times are in yyyy-MM-dd format, the request isn't working.
This is my javascript code:
var toTime = new Date();
var fromTime = new Date();
fromTime.setHours(toTime.getHours() - 48);
var address = "http://stackoverflow.com/users/rep/" + getUserId() + "/" + \
formatDate(fromTime,"yyyy-MM-dd") + "/" + \
formatDate(toTime,"yyyy-MM-dd");
$.getJSON(address, UpdateRepInfo);
the function UpdateRepInfo
isn't being called at all.
I can verify the address is valid when I copy and paste the generated address into Chrome, I download the file containing the correct JSON.
I'm still learning a ton about JSON and JQuery so is there any major errors I've made, because I can't work it out.
EDIT: I should point out I have successfully used the Flair json, so I'm sure that the cross-domain call isn't the issue.
EDIT 2: I posted about this on Meta and received an answer from Jeff Atwood: http://meta.stackoverflow.com/questions/31658/jsonp-not-supported-on-rep-rep-graph-url-for-a-reason. I'm marking this as closed as this is no longer applicable and seems to be impossible due to the server side setup of that json.