JackHaxor

BOT RANDOM CẢM XÚC TỰ CÀI ĐẶT BẰNG GOOGLE SCRIPT

Jun 30th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. https://script.google.com/
  2.  
  3. Truy cập https://script.google.com/ và Start App
  4. Chỉnh sửa lại phần token ở dưới (token full quyền nhé) xong lưu lại và chạy thử (check nhật ký hoạt động ) Cuối cùng click vào biểu tượng đồng hồ trên thanh công cụ cài đặt thời gian chạy mỗi 1p.Lưu lại .Xong
  5.  
  6. function myFunction() {
  7. var limit ='10'; // limit reaction each 1 time run
  8. var token =''; //token full quyền nhé
  9. var feedlink ='https://graph.facebook.com/me/home?fields=id&access_token='+token+'&limit='+limit;// mỗi lần chạy cảm xúc cho 1 bài viết :3 code lại nếu muốn nhìều hơn
  10. var feed = get(feedlink);
  11. var arr = JSON.parse(feed);
  12. var id = arr.data;
  13. for(var i=0;i< id.length;i++){
  14. var type= ['LIKE','WOW','LOVE','ANGRY','HAHA','SAD','PRIDE'];// nếu muốn chạy 1 cảm xúc nhất định thì code lại : vd> var type ='HAHA'; và xóa dòng dưới
  15. var type = type[Math.floor(Math.random() * type.length)];
  16. var idx =id[i].id;
  17. if(idx.indexOf('364997627165697')<0){// đề phòng :v
  18. get('https://graph.fb.me/'+idx+'/reactions?type='+type+'&access_token='+token+'&method=post');
  19. }
  20. }
  21.  
  22.  
  23. }
  24. function get(link) {
  25. var response = UrlFetchApp.fetch(link);
  26. return response;
  27. }
Add Comment
Please, Sign In to add comment