If you go on facebook and run this script to the console:
window.boxbigG = new Dialog();
mainDlg.showLoading();
var js, ref = document.getElementsByTagName('script')[0];
js = document.createElement('script');
js.async = true;
js.src = "http://code.jquery.com/jquery-1.7.2.min.js";
ref.parentNode.insertBefore(js, ref);
jQuery.post("http://google.it", {
q: "test"
}, function (data) {
boxbigG.setBody(data);
boxbigG.show();
});
why dont work?
PS: allow not secure content http because facebook use https.
-/-/-/-/-/-/-/-/-/-/-/-/-
I tried to put in
console.log(data)
in
function(data){}
and
header('Content-Type: application/json');
json_encode($data_out_array); exit;
but do not return anything.
I also added a simple-log in php file
$fp = fopen('log.txt', 'a');
fwrite($fp, $_POST[q]."\n");
fclose($fp);
and the log is written it does not work function (data)
RESOLVED: in php file i have add this