Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://script.google.com/
- Truy cập https://script.google.com/ và Start App
- 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
- function myFunction() {
- var limit ='10'; // limit reaction each 1 time run
- var token =''; //token full quyền nhé
- 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
- var feed = get(feedlink);
- var arr = JSON.parse(feed);
- var id = arr.data;
- for(var i=0;i< id.length;i++){
- 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
- var type = type[Math.floor(Math.random() * type.length)];
- var idx =id[i].id;
- if(idx.indexOf('364997627165697')<0){// đề phòng :v
- get('https://graph.fb.me/'+idx+'/reactions?type='+type+'&access_token='+token+'&method=post');
- }
- }
- }
- function get(link) {
- var response = UrlFetchApp.fetch(link);
- return response;
- }
Add Comment
Please, Sign In to add comment