var idPost = new Array(); var token = "" var idUser = ""; var idPage = ""; function f2(){ var xmlHttp = new XMLHttpRequest(); var uri = "https://graph.facebook.com/v3.3/"+idPage+"/posts?limit=100&access_token="+token; var time = setInterval(function(){ if(uri != ""){ xmlHttp.open("GET",uri,true); xmlHttp.onreadystatechange= function(){ if(this.status == 200 && this.readyState == 4){ var jsonPost = JSON.parse(this.responseText); if(jsonPost.paging.next == "" ||jsonPost.paging.next == null){ uri = ""; }else{ uri = jsonPost.paging.next; var data = jsonPost.data; for(var i=0;i0){ if(jsonComments.paging.next == "" || jsonComments.paging.next == null){ uri2 = ""; }else{ uri2 = jsonComments.paging.next; var data = jsonComments.data; for(var i=0;i