Invite all friends to like a page on Facebook

By on

Shhh. Don’t tell anyone but we just figured out how to invite all of your friends to a page on Facebook. This is rather useful as Facebook deliberately leave out a ‘Select All’ button and force you to click each person individually. Well, we got tired of that and this is how we would around it if we were that way inclined.

A word to the wise, only let your friends know about this as Facebook will surely take action to stop this working when they find out.

This information is provided for reference only and Pivotal take no responsibility for the consequences (if any) using the below tip. It should be fine as it simulates real clicks.

Here goes:

1. Open Chrome and navigate to your Facebook page.

2. Click on ‘Invite Friends’.

3. Change the menu drop down from ‘Recent interactions’ to ‘Search all friends’.

4. Scroll right to the bottom of your friends list as Facebook extends the list only when the list is scrolled.

5. Press CTRL+SHIFT+J to open up the Javascript input window.

6. Copy and paste the below code into the new area in Chrome.

var inputs = document.getElementsByTagName(“input”);
for (var i=0; i < inputs.length; i++) {
if (inputs[i].getAttribute(‘type’) == ‘checkbox’) {

7. Click ‘Submit’ on the Facebook popup window and wait. You should have confirmation that your friends have been notified about your page.

8. Kick back and relax, maybe even get a domain and hosting package from Pivotal while you wait. Just type in a domain you’d like in the text area in the above menu and hit the big red ‘GO’ button.

37 thoughts on “Invite all friends to like a page on Facebook”

    • You press Ctrl+Shift+J then click “Console” and paste it there,,,
      the way you know it has worked is that the boxes actually get ticked right before your eyes

      all this code does is looks at all the elements on the current page and if its a checkbox it clicks it 😉

      Oh and the reason you have to scroll to the bottom of your friendlist is that only a few are loaded until you get to the bottom of the list… when the list first loads its only the first say 30 or so that load and the rest load as you scroll down – so if you run this code before being the bottom of the list only the first few will be clicked

        • In Google Chrome you have to press and hold CTRL then also press and hold SHIFT and whilst you keep these pressed down just tap J and the Javascript console will appear. It has been tested on the latest version of Google Chrome and works every time. 🙂

          • Sure, if you are on Chrome on your Mac then just go to the top right and click the three horizontal lines. Then go to ‘Tools’ and then ‘Javascript Console’ and it will bring to the same place as the keyboard shortcut. Then just paste in the code from above. 🙂

  1. Thanks for the video! You don’t happen to know how to use the code in IE browsers?

    Another question, some of my friends are “faded out” even though they have not yet liked my page. How can I still invite them? Do you know?

    Thanks a lot!

  2. I have done all the steps but it does not give me the option to paste when I have the Google Chrome console open. I am using a Mac. Thanks you any ideas would be great I have tried several different ways.

  3. Hi there, I followed the instructions and got as far as the code ticked all the boxes of my friends..then I sent off the invites…I checked again and none of the invites have actually sent?? did i do something wrong?

Leave a comment