Skip to content

Instantly share code, notes, and snippets.

@groupunknown
Created May 30, 2020 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save groupunknown/1e373d2dab16eada5812da6b90526106 to your computer and use it in GitHub Desktop.
Save groupunknown/1e373d2dab16eada5812da6b90526106 to your computer and use it in GitHub Desktop.
Bot comment facebook mobile
/**
* https://stackoverflow.com/a/62103618/9537649
* https://m.facebook.com/${author}/posts/${postId}
*/
function start() {
setTimeout(function() {
const rand = Math.floor(Math.random() * 767) + 1 + Math.random().toString(36).substr(2, 5);
document.querySelector("input[name='comment_text']").value = rand;
const submitButton = document.querySelector("button[name='submit']");
submitButton.disabled = false;
submitButton.click();
start();
}, 3000);
}
start(); // unlimited
function start(counter){
if(counter < 250){
setTimeout(function(){
counter++;
const rand = Math.floor(Math.random() * 767) + 1 + Math.random().toString(36).substr(2, 5);
document.querySelector("input[name='comment_text']").value = rand;
const submitButton = document.querySelector("button[name='submit']");
submitButton.disabled = false;
submitButton.click();
start(counter);
}, 3000);
}
}
start(0); // limit 250 comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment