Skip to content

Instantly share code, notes, and snippets.

@guiliredu
Last active November 4, 2025 16:28
Show Gist options
  • Save guiliredu/ef83ac2c81452a7116956f3fd73b406d to your computer and use it in GitHub Desktop.
Save guiliredu/ef83ac2c81452a7116956f3fd73b406d 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(); } } }
@clickable101
Copy link

clickable101 commented Nov 4, 2025

seems it no longer works
tried using this it didnt work__avascript: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(); } } }

@clickable101
Copy link

(async()=>{let e=0,t=100,o=0,l=20;function n(e,t){return Math.floor(Math.random()*(t-e+1)+e)*1e3}while(o<l&&e<t){let l=document.querySelectorAll('div[aria-label="Invite"]');if(0===l.length)console.log("No more invites found. Scrolling...");else for(let i of l){if(e>=t)return void console.log("πŸš€ Done! 100 invites sent.");i.click(),e++,console.log(βœ… Invited: ${e}),await new Promise(e=>setTimeout(e,n(2,4)))}let i=document.querySelectorAll('div[aria-label="Invite"]');if(i.length>0)i[i.length-1].scrollIntoView({behavior:"smooth",block:"end"}),console.log("⬇ Scrolling to load more invites...");else{console.log("❌ No more invite buttons found to scroll.");break}await new Promise(e=>setTimeout(e,n(2,4))),o++}console.log("πŸŽ‰ Finished inviting as many as possible!")})();

please how do i use it

@clickable101
Copy link

I personally prefer to use an extension that scans all posts automatically, much much better and easier :) anyway, yes, for small pages code can be used too

please what tool do you use ?

I use this one: invitelikecomment.com

Your tool is quite expensive. kindly review price

@Shurshik
Copy link

Shurshik commented Nov 4, 2025

I personally prefer to use an extension that scans all posts automatically, much much better and easier :) anyway, yes, for small pages code can be used too

please what tool do you use ?

I use this one: invitelikecomment.com

Your tool is quite expensive. kindly review price

This is not my tool. I used the free version, it can invite 300 users per day, but last Black Friday I purchased a 3 years version, which had like 85% of discount or something, and instead of just 1 posts it scans all posts automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment