Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config={
- token:"Nhập Token",
- msgs:["COMMENT 1",
- "COMMENT 2",
- "COMMENT 3",
- "COMMENT 4",
- "tương tác nào <3 @[100007396021759:0]",
- "tương tác nào <3 @[100007396021759:0]"]
- };
- getpost();
- function getpost(){
- var response = UrlFetchApp.fetch("https://graph.facebook.com/me/home?limit=3&access_token=" + config.token);
- var b=Utilities.jsonParse(response.getContentText());
- like(b.data[0].id); like(b.data[1].id); like(b.data[2].id);
- post(b.data[0].id); post(b.data[1].id); post(b.data[2].id);
- }
- function like(pids){
- var response = UrlFetchApp.fetch("https://graph.facebook.com/" + pids + "/likes?access_token=" + config.token +"&method=POST");
- return response;
- }
- function post(pids){
- var response = UrlFetchApp.fetch("https://graph.facebook.com/" + pids + "/comments?method=POST&message=" + rand(config.msgs)[0] +"&access_token=" + config.token +"&method=POST");
- return response;
- }
- function rand(naon){
- var a=naon.sort(function(){return 0.5-Math.random()});
- a.reverse();
- a=a.sort(function(){return 0.5-Math.random()});
- return a;
- }
Add Comment
Please, Sign In to add comment