How to invite all your Facebook friends to an event at once (code has changed)


In the last few days, Facebook has changed the “invite your friends” functionality, which powers suggestions and invitations to events, groups, pages, etc.

The result is that old Javascript codes that allowed you to invite ALL your Facebook friends to an event in a snap (such as this) are now broken.

To select all your new friends in the new interface you can use this code, tested under Safari 5.0.4, Chrome 10 and Firefox 4 (should work also under IE).
UPDATE: There are many reports of it working on newer versions in the comments below.

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');

In order to use this code, copy and paste it in the address bar of your browser after you have opened the “invite your friends” dialog and AFTER YOU HAVE SCROLLED DOWN THE LIST.

Important note: as said, you HAVE to scroll down your friends list in order to invite all your friends: in fact the new interface only loads few friends via AJAX at a given time.

Facebook should definitely be a little more open regarding MY data, loaded on their systems… and this script opens it just a bit more.

DISCLAIMER: I DO NOT ASSUME ANY RESPONSIBILITY WHATSOEVER FOR THE USAGE OF THIS CODE; IF YOU GET BANNED BY FACEBOOK, OR ANYTHING ELSE, YOU WILL BE CLAIMED THE SOLE RESPONSIBLE FOR SUCH ACTIONS.

  1. #1 by bryan on 31/01/2012 - 19:18

    Hey Pam…….you have to hit “enter” after you paste the code

  2. #2 by PEDJA on 12/02/2012 - 10:02

    It’s working , but when I click send , Facebook send me this message !!!!!!!!!!!!

    Please narrow your invite list to friends who are most likely to be interested in this event.

    If you’ve received this message in error, visit this form.

  3. #3 by nagaraaz on 15/02/2012 - 11:12

    invaite freands

  4. #4 by Alexa on 22/02/2012 - 18:54

    Not working for me :(

  5. #5 by dom on 25/02/2012 - 22:12

    FB have clamped down on this now… certainly for me nyway.

    “please try and invite people who you think will be interested in going to your event” or somesuch message…

  6. #6 by SB Matin on 01/03/2012 - 19:59

    Thank you very much bro! It works!

  7. #7 by scalco on 07/03/2012 - 03:16

    perfect & powerful!

  8. #8 by Elin on 08/03/2012 - 17:14

    I had to type “javascript:” into the address bar to make it work for some reason that wouldn’t paste in. ?!?! Anyway it worked after I did that.

  9. #9 by mike on 09/03/2012 - 19:12

    dammm i need a code….im sending out like 3-4000 invites and i gatt a click 1 by one..i don’t understand why Facebook cares how many ppl u invite to a event????? y do they let u have that many friends

  10. #10 by Rosita on 10/03/2012 - 08:01

    I did everything right, I even got the alert that all my friends have been selected, even though none of them are selected.
    When I clicked on ‘Next’ this message shows up: “Please select one or more friends and then choose Send, or just choose Cancel.” Help!

  11. #11 by sreya on 14/03/2012 - 09:04

    I wish to invite more friends

  12. #12 by kurt on 16/03/2012 - 02:04

    I own a social media marketing company based in New Jersey. As a social media specialist this code is extremely useful I tested it and invite all 1600+ Facebook friends to an event! The only question I have is has anyone heard of accounts being blocked for doing this???? I don’t want to use this code to much if accounts will get blocked… Please let me know the probability of something like that occurring. Thanks! Visit http://www.impactsocialnetworking.com to check out my website any feedback is much appreciated!

  13. #13 by joe on 16/03/2012 - 19:34

    Here is a way to do it with no code.
    http://www.youtube.com/watch?v=izgWjquZ8Rc

    this might be useful for people not wanting to deal with the code or that aren’t too technical.

  14. #14 by shebin joseph on 21/03/2012 - 15:33

    workinggggggggggggggggggggggggggggg……………….thank you so much……….

  15. #15 by Lucy Loveheart on 30/03/2012 - 14:04

    Best code so far – thank you x

  16. #16 by john on 31/03/2012 - 16:25

    Worked great with ie 8.

    Thanks!

  17. #17 by Tsunami on 31/03/2012 - 19:26

    Working on Chrome, need to manually write the javascript: part at the start yourself though

  18. #18 by jonkino on 01/04/2012 - 01:48

    Doesn’t work for me. IN fact FB is worse then ever. When you set up a group event, you can only only seem to invite the group friends (manually) and there seems to be no way of now inviting your friends to an event unless they are a member of the group that the event is set up in. very very frustrating. Does anyone know a way around this?

  19. #19 by Ray on 03/04/2012 - 00:57

    This script did not work. Just like all of them.

  20. #20 by Lightinz on 04/04/2012 - 18:24

    Script didn’t Work -_-
    I am using Firefox(latest Version)

  21. #21 by Marco Vasta on 05/04/2012 - 17:28

    On 5 april 2012 it works on 4670 friends. Thanks

  22. #22 by Marco Vasta on 05/04/2012 - 17:29

    I forget, it takes about 1 hour to select all 4600 pax.

  23. #23 by Jeremie on 06/04/2012 - 05:52

    not working using the address bar but it worked using the console (Shift+ctrl+I) in Google Chrome 19.0.1084.9

  24. #24 by b-bOP 2012 on 08/04/2012 - 12:09

    it worked on fire fox but my Facebook is frozen on the “loading…” prompt. What do i do?

  25. #25 by Sean on 09/04/2012 - 05:27

    GOD BLESS YOU!!

(will not be published)