Select All Friends on Facebook Javascript Code Chrome Extension

Select All Friends on Facebook

Sometimes you need to invite your friends to like a page or to an event on Facebook. Its easy if your friends are just 20 or 30. But its frustrating if you have to select thousands of friends.
You can't click 1000 times to select 1000 friends. So here the trick to help you.
Bookmarklet
Select All

Add the Bookmark to make it easy

The easier trick is that you just drag the Bookmarklet "Select All" to your bookmark bar and forget it. Once you are on that FB page where you have to select all of your friends just click on this bookmark "Select All". It will select all of your friends in one go. It might take some time depending upon the number of friends you have got. It can take upto 1 min if you have got 1000 friends.

Javascript Code to Select All friends on Facebook

Here i will tell you the javascript code and the method to use it. One you are on the page where you have to select all of your friends follow the following steps. I will suggest you to use Google Chrome.
Step 1: Scroll down in the facebook Select Friends box so that the complete friends list is loaded.
Step 2: Press F12 and go to console tab.
Step 3: Paste the following code into it and press "Enter".

javascript:var x=document.getElementsByTagName("input");for(var i=0;i<x.length;i++) {if (x[i].type == 'checkbox') {x[i].click();}}; alert('Done, all your friends have been selected');

Step 4: Wait for a while till the javascript works. It might take 1 or 2 minutes depending upon the number of friends you have got.
Step 5: It will display a message when all friends are selected. Press "OK" to clear it and then Press "Invite" button on FB.

1 comment: