DEV Community

MozzamShahid
MozzamShahid

Posted on

Facebook Page Invite Code 2024 | Work for People that Like Your Post

Here is the Code Paste that in the Console
Make Sure first you scroll down to the bottom of the invite tab so that every invite button is shown. Then, paste the code and sit back and relax.

`let mozzam = function() {
let buttons = document.querySelectorAll('[aria-label="Invite"]:not([data-clicked])');
let index = 0;

let interval = setInterval(() => {
    if (index < buttons.length) {
        buttons[index].click();
        buttons[index].setAttribute('data-clicked', 'true'); // Mark button as clicked
        index++;
    } else {
        window.scrollBy(0, window.innerHeight); // Scroll down
        buttons = document.querySelectorAll('[aria-label="Invite"]:not([data-clicked])'); // Update buttons
        index = 0;

        if (buttons.length === 0) {
            clearInterval(interval); // Stop when no buttons remain
            console.log("No more buttons to click!");
        }
    }
}, 3000); // Click every 3 seconds
Enter fullscreen mode Exit fullscreen mode

};

mozzam();

`

Top comments (1)

Collapse
 
mozzamshahid profile image
MozzamShahid

let mozzam = function() {
let buttons = document.querySelectorAll('[aria-label="Invite"]:not([data-clicked])');
let index = 0;

let interval = setInterval(() => {
    if (index < buttons.length) {
        buttons[index].click();
        buttons[index].setAttribute('data-clicked', 'true'); // Mark button as clicked
        index++;
    } else {
        window.scrollBy(0, window.innerHeight); // Scroll down
        buttons = document.querySelectorAll('[aria-label="Invite"]:not([data-clicked])'); // Update buttons
        index = 0;

        if (buttons.length === 0) {
            clearInterval(interval); // Stop when no buttons remain
            console.log("No more buttons to click!");
        }
    }
}, 3000); // Click every 3 seconds
Enter fullscreen mode Exit fullscreen mode

};

mozzam();