Skip to content

Instantly share code, notes, and snippets.

@TimothyBramlett
Forked from guiliredu/facebook-page-invite.js
Created September 23, 2019 05:44
Show Gist options
  • Save TimothyBramlett/7283b40d1468db57a44c5fa3d6d4d9a7 to your computer and use it in GitHub Desktop.
Save TimothyBramlett/7283b40d1468db57a44c5fa3d6d4d9a7 to your computer and use it in GitHub Desktop.
Facebook - Script to auto invite people who liked a page post do like the page
var buttons;
buttons = document.getElementsByClassName('_42ft');
for (var i = 0; i < buttons.length; i++) {
if(buttons[i].getAttribute('ajaxify') != null){
if(buttons[i].getAttribute('ajaxify').indexOf('invite') != -1){
buttons[i].click();
}
}
}

How to use

  • Open the facebook window with people yuo want to invite
  • Copy the code and place on your browser url input OR open console and place
  • To use in the browser url input, copy the code below:
javascript:var buttons; buttons = document.getElementsByClassName('_42ft'); for (var i = 0; i < buttons.length; i++) { if(buttons[i].getAttribute('ajaxify') != null){ if(buttons[i].getAttribute('ajaxify').indexOf('invite') != -1){ buttons[i].click(); } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment