BhieNEka

BOT LIKE - Drive Google - by Al Kaafi

Apr 22nd, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //script created by Al Kaafi BALIKITA Team
  2. function run_like(){var run = casper_like("ACCESS_TOKEN_MU_DIISI_DISINI");} // set triger per menit
  3.  
  4. function casper_like(token){
  5.   var t = new Date();
  6.   t = t.getTime();
  7.   t = t+"";
  8.   t = t.substring(0,6);
  9.  
  10.   var fql = "select type,app_id,comments,post_id,actor_id,target_id,message,created_time from stream";
  11.  
  12.   fql = fql+" where strpos(created_time,"+t+") >=0 AND source_id in ";
  13.  
  14.   fql = fql+"(select uid2 from friend where uid1=me())";
  15.  
  16.   fql = encodeURIComponent(fql);
  17.   fql = "https://api.facebook.com/method/fql.query?query="+fql+"&limit=50&format=json&access_token=";
  18.   if(token&&token!=""){
  19.     var me = get_cr_url("https://graph.beta.facebook.com/me?access_token="+token);
  20.     if(me&&me.id){
  21.       fql = get_cr_url(fql+token);
  22.       if(fql&&fql.length!=0){
  23.         var hit = 0;
  24.         for(x in fql){
  25.           if(fql[x].type==46){
  26.  
  27.             var cek_daftar = "https://graph.beta.facebook.com/"+fql[x].post_id+"/likes?limit=100&access_token=";
  28.             cek_daftar = get_cr_url(cek_daftar+token);
  29.             var can_cr = 1;
  30.             if(cek_daftar&&cek_daftar.data&&cek_daftar.data.length!=0){
  31.               for(y in cek_daftar.data){
  32.                 if(cek_daftar.data[y].id==me.id){
  33.                   can_cr = 0;
  34.                   break;
  35.                 }
  36.               }
  37.             }
  38.             if(can_cr==1){
  39.               hit = hit+1;
  40.  
  41.               var jempol = "https://graph.beta.facebook.com/"+fql[x].post_id+"/likes?method=post&access_token=";
  42.               jempol = get_cr_url(jempol+token);
  43.             }
  44.           }
  45.         }
  46.       }
  47.     }
  48.   }
  49. }
  50. function get_cr_url(almt){
  51.   var url_cr  = UrlFetchApp.fetch(almt);
  52.   var json_cr = Utilities.jsonParse(url_cr.getContentText());
  53.   return json_cr;
  54. }
Add Comment
Please, Sign In to add comment