Skip to content

Instantly share code, notes, and snippets.

@federicosan
Forked from guiliredu/facebook-page-invite.js
Created November 5, 2017 22:33
Show Gist options
  • Save federicosan/197dd45d89be6e991ed053a1b85b903a to your computer and use it in GitHub Desktop.
Save federicosan/197dd45d89be6e991ed053a1b85b903a 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();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment