Facebook made a few changes which has been making our methods described here unusable to select all your friends on pages, events and groups . But we’ve found a new Facebook select code that works on all of the pages and or inviting friends to a event. Here’s what you have to do:
Open up a Facebook page and press the see all link on the invite section.
Now you will get a list of friends with invite buttons on the right side. Then open up the Firefox developer console by pressing “F12“, and go to the console tab. This is where you paste in the javascript code to execute it. Then press Enter on your keyboard to initiate the process on Facebook. Here is how it goes, the picture below is how you will see your friend list first.
Below is the screen of the console window available on Firefox. Add the Facebook select all code and press enter on your keyboard. You might want to scroll down all the way down to the bottom of your friends list to select all at once because Facebook will only load a section of you friends list on a first start. And also you have to remember, more the number of your friends, more time it is going to take to automate all the clicks. Once done you’ll see Invite Sent under your Friends names.
Then this is the windows you will see on your Facebook invite list.
The Facebook select all codes are:
For pages
javascript:var inputs = document.getElementsByClassName('uiButton _1sm'); for(var i=0; i<inputs.length;i++) { inputs[i].click(); }
For Events
javascript:elms=document.getElementsByName("checkableitems[]"); for (i=0;i<elms.length;i++){ if (elms[i].type="checkbox") elms[i].click() }
Just paste this javascript code in your navigation bar in your browser. Make sure you’re using a latest browser like Firefox and Chrome or Iron.
Update: The facebook select all code is still working December 13, 2013.