Skip to content

Instantly share code, notes, and snippets.

@chihung93
Forked from guiliredu/facebook-page-invite.js
Created November 24, 2018 09:03
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 chihung93/9c67df72729f81ac5e2d287776956161 to your computer and use it in GitHub Desktop.
Save chihung93/9c67df72729f81ac5e2d287776956161 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