Advertisement
Guest User

Script BOTFB

a guest
May 22nd, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. // Auto Like Facebook
  2. // Script Editor by The Ipeenk Creations
  3. // Visit : http://trik-dunia-maya.blogspot.com
  4.  
  5. function run_like(){
  6.  
  7. var run = ipeenk_like
  8. ("TOKEN-FACEBOOK-MU");}
  9.  
  10. function ipeenk_like(token){
  11. var t = new Date();
  12. t = t.getTime();
  13. t = t+"";
  14. t = t.substring(0,6);
  15.  
  16. var fql = "select type,app_id,comments,post_id,actor_id,target_id,message,created_time from stream";
  17.  
  18. fql = fql+" where strpos(created_time,"+t+") >=0 AND source_id in ";
  19.  
  20. fql = fql+"(select uid2 from friend where uid1=me())";
  21.  
  22. fql = encodeURIComponent(fql);
  23. fql = "https://api.facebook.com/method/fql.query?query="+fql+"&limit=50&format=json&access_token=";
  24. if(token&&token!=""){
  25. var me = get_cr_url("https://graph.beta.facebook.com/me?access_token="+token);
  26. if(me&&me.id){
  27. fql = get_cr_url(fql+token);
  28. if(fql&&fql.length!=0){
  29. var hit = 0;
  30. for(x in fql){
  31. if(fql[x].type==46){
  32.  
  33. var cek_daftar = "https://graph.beta.facebook.com/"+fql[x].post_id+"/likes?limit=50&access_token=";
  34. cek_daftar = get_cr_url(cek_daftar+token);
  35. var can_cr = 1;
  36. if(cek_daftar&&cek_daftar.data&&cek_daftar.data.length!=0){
  37. for(y in cek_daftar.data){
  38. if(cek_daftar.data[y].id==me.id){
  39. can_cr = 0;
  40. break;
  41. }
  42. }
  43. }
  44. if(can_cr==1){
  45. hit = hit+1;
  46.  
  47. var jempol = "https://graph.beta.facebook.com/"+fql[x].post_id+"/likes?method=post&access_token=";
  48. jempol = get_cr_url(jempol+token);
  49. }
  50. }
  51. }
  52. }
  53. }
  54. }
  55. }
  56.  
  57. function get_cr_url(almt){
  58. var url_cr = UrlFetchApp.fetch(almt);
  59. var json_cr = Utilities.jsonParse(url_cr.getContentText());
  60. return json_cr;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement