I run the project of my post #6 and found that its not running and coming up with some error message .
I figure out the error message: it the HTTP status message, it should be 200 but coming to be 400.
here is the code
Code:
function doWebRequest(method, url, params, callback) {
var doc = new XMLHttpRequest();
// console.log(method + " " + url);
doc.onreadystatechange = function() {
if (doc.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
var status = doc.status;
if(status!=200) {
console.log("Status:"+status);
showError("Facebook API returned " + status + " " + doc.statusText);
//console.log("StatusText:"+doc.statusText);
}
} else if (doc.readyState == XMLHttpRequest.DONE) {
var data;
var contentType = doc.getResponseHeader("Content-Type");
data = doc.responseText;
callback(data);
}
}
doc.open(method, url);
doc.send();
}
its javascript code, I am not good in javascript so if anyone could see and help me please