Inviting All Friends to Facebook Events

Update June 7, 2011: Sometime last week it appears the script no longer works. If someone finds another solution, or writes a new script, we would love it if you let us know.

Update March 16, 2011: Not exactly sure when Facebook rolled out the changes to their events (sometime in the last week?). The original referenced script no longer works with the newest changes. Thanks to one of the super people who commented below (Michele). He shared a new script that allows you to invite 200 at a time. His post indicates he tested in Chrome and I tested in Firefox. You can repeat the process (200 at a time). Thanks, Michele

Additional note discovered by another reader ~ if you scroll to the bottom of your friends list (in the pop-up window) before running the script in your browser it will select all friends. It may take awhile…in my tests in both Firefox and Chrome it took about 7 minutes to fully process.

Here is the new javascript: (download in .txt file)

javascript:elms=document.getElementsByName(“checkableitems[]“);for (i=0;i<elms.length;i++){if (elms[i].type=”checkbox” )elms[i].click()};

If the code above doesn’t work please download it from the .txt file link above.

My job on a day-to-day basis is all about efficiency, doing more in less time and finding nifty tips and tricks that help me and my clients. That’s why I’m excited, in a geeky way (of course) about this trick that is specific to Facebook Events.

If you’re one of those folks who regularly creates events in Facebook, you probably know what I mean. Your wrist gets all tingly and ultimately falls asleep and you find yourself bored to tears from the sheer drudgery of all the scrolling down and clicking each friend’s avatar to invite them to your stinking event. For you, this will be one of those Hallelujah! moments.

And the super HooDoo VooDoo magic trick? Well, it allows you to use a nifty Javascript command in your browser. Instead of clicking each person’s name/avatar individually in the “select guests to invite” window, it will automatically select all of your friends. Hooray!

In my first test, I used Firefox and it took about seven minutes. (Firefox actually initially said “not responding,” but I left well enough alone and sure enough, voila it worked like a charm.)

In my second test I used Chrome and it literally worked in less than 10 seconds. Here’s what you do:

  1. Create your event and save
  2. Go back to “edit event”
  3. Chose “Select Guests to Invite” button
  4. Wait for all friends to load, which may take some time
  5. Paste the command below into address bar of your browser (NOT the search bar that shows in the pop-up box that loads when you chose “select guests to invite”)

javascript:elms=document.getElementById(‘friends’).getElementsByTagName(‘li’);for(var fid in elms){if(typeof elms[fid] === ‘object’){fs.click(elms[fid]);}}

This screenshot is from Chrome of the Javascript command in your browser URL area

Facebook Invite All Friends to Events Javascript Command

Be patient and let your browser do its thing ~ wait until all of your friends avatars are highlighted as “selected” guests. In the screenshot below, upper right corner you will see “1108” as the selected number.

Facebook Select All Friends

Once all of your friends are selected, you can enter a personal message (optional) and then just hit “Save and Close.”

Hopefully, if you’re a crazy multi-tasker like me, and creating events and inviting folks to them, you’ll enjoy this as much as I do

PS: Since I did test number two in Chrome I took my screenshots there using Awesome Screenshot browser add on that Shelly recently wrote about. I was a Jing user, but am now totally sold on Awesome Screenshot after trying it for the first time with the above screenshots. Woohoo!

  • Vinylgurlguardian

    As an events promoter, sometimes facebook lags especially if you have around 1,000 plus members to invite.  It took me sometime but this java script works with just one click.  Patience dear juggernault as they say.

  • Anonymous

    Glad it worked for you!!

  • Imanol Anguiano

    It stops working again :(

  • http://www.thevirtualasst.com Michelle Mangen

    Imanol – it’s been pretty hit or miss since June 7th. Facebook changes things a lot and as of now I am not aware of a new script.

  • Djvampjd

    doesnt seem to work anymore 22nd august 2011

  • Mrawsome61

    i have chrome and wen i hit enter it just searches it

  • DJHANS

    NOT WORKING ANYMORE… ANYONE HAVE ANYTHING NEW?

  • http://www.thevirtualasst.com Michelle Mangen

    Not that I’m aware of…though I wish there were, it sure was handy!

  • http://www.thevirtualasst.com Michelle Mangen

    The script hasn’t been working since early June :(

  • Jimmy

    it still works for me, but it takes a little bit longer i think.

  • Creatingcommunity

    09/04/2011 It worked for me today.   Used the text file version above. Used Chrome. Created a Bookmark with the url from the text file in Chrome.   Opened the Invite Friends window and then clicked the Book mark.  Ta Da.  Thanks soooooooooooooo very much!!!!!! 

  • http://www.thevirtualasst.com Michelle Mangen

    Wow, surprised to hear that but happy to know it worked for you. Seems there has been very mixed success with it since early June.

  • http://www.thevirtualasst.com Michelle Mangen

    Djvampjd – top of post has a note that it hasn’t been working since early June. However, for some reason, on some days it appears to work for others based on the comments they are leaving here. Not sure of the rhyme or reason as to why it’s being so sporadic.

  • Sunshinestudios

    Was working every time for me until last week..:(((  help!!

  • http://www.thevirtualasst.com Michelle Mangen

    Sorry, don’t know what to tell you. Facebook is constantly making changes.

  • http://www.facebook.com/profile.php?id=100001063812632 Anshuman Thakur

    nice

    doesnt work with firefox  or chrome but with internet explorer

  • http://www.facebook.com/people/Ana-Maria/1482844392 Ana Maria

    this doesnt work anymore

  • http://www.facebook.com/people/Ana-Maria/1482844392 Ana Maria

    This doesnt work anymore

  • http://www.thevirtualasst.com Michelle Mangen

    Ana – it has been working, sporadically at best, since the update mentioned at the top of the post on June 7th. 

  • Asap_bobby

    can someone freaken find one for google CHROME PLEASE I BEG U!

  • Asap_bobby

    yes totally works on chrome:  

    step 1: type in:  javascript: 

    step 2: paste: javascript:elms=document.getElementsByName(“checkableitems[]“);for (i=0;i<elms.length;i++){if (elms[i].type="checkbox" )elms[i].click()};

  • http://www.thevirtualasst.com Michelle Mangen

    Bobby – glad to hear you found that…it doesn’t work for me.

  • OfficeSecretary

    For some reason, only the script in the .txt file works. I used Internet Explorer and it selected all my 1000+ friends within 5 minutes. THANK YOU THANK YOU THANK YOU!

    such a time saver…

  • Summer20fun

    Save this in your favorites and then click it after scrolling down to the bottom of your list of friends…worked for me in google chrome but none of these other suggestions did.
    javascript:elms=document.getElementsByName(“checkableitems[]“);for%20(i=0;i<elms.length;i++){if%20(elms[i].type="checkbox"%20)elms[i].click()};

  • http://www.thevirtualasst.com Michelle Mangen

    Summer – thanks for the tip. I’ll def try that myself the next time I do an event. 

  • Ahmadkloub

    it works .. just leave a space between javascript:(space) then the rest of the code… cheerz

  • http://www.thevirtualasst.com Michelle Mangen

    Ahmad – love that you shared this. Thanks.

  • Jollysailor

    definatelynot working for me. i have vista…

  • http://www.thevirtualasst.com Michelle Mangen

    JollySailor – same for me, none of the other fixes below will work and I’m also on Vista. :(

  • Steven

    It worked, but then gave me an error message and asked me to put in the characters in the box for security verification???

  • http://www.facebook.com/ktwiford Karl Twiford

    REALLY! it don’t work….. AT ALL

  • gianna

    it isnt working ):

  • http://www.thevirtualasst.com Michelle Mangen

    It hasn’t been working since early June (see top of post for more detail)

  • http://www.facebook.com/people/Corina-Popescu/1311014561 Corina Popescu

    This is for Facebook only.
    What about invite all friends from email addresses?

  • http://www.thevirtualasst.com Michelle Mangen

    Not sure how that works, since I don’t have all of my Facebook friends’ email addresses I’ve never tried that method.

  • Ianpirro

    wrote this today works fine.

    javascript:var x= document.getElementsByClassName(“checkbox”); for (y in x){x[y].click()}

  • Ianpirro

    if you copy & paste this you may have to re-add the javascript: at the beginning some browsers remove it when pasted in address bar

  • Davi

    If you type the javascript: in the address bar it works fine. Some browser’s delete this part of the command when you paste it.

  • http://www.thevirtualasst.com Michelle Mangen

    Davi – what browser are you using? I’m on most recent version of Firefox and it still doesn’t work for me (and the “javascript” is there)

  • Shiftnc

    It just worked when I used it in Chrome – I did have to retype the words ‘javascript’ at the beginning but other than that – good to go

  • Jon O

    retyped ‘javascript’ and no luck.  Using Firefox. Any suggestions?

  • http://www.thevirtualasst.com Michelle Mangen

    Sorry no answer for you —- I’ve tried the suggestions offered by others in this thread but I’m not getting it to work either (I’m on newest version of FF and one suggestion in the comment thread is several versions “old”)

  • Azactive

    only works 100 then 50 at a time
    arrggghh

  • Mmcleavy

    when I copy the script into the address bar and hit enter (in chrome) it just goes to a google search results page…what am I doing wrong?

  • http://www.thevirtualasst.com Michelle Mangen

    Not sure as it won’t work for me either. From the comments below you’ll see some pretty mixed results since the changes Facebook made last June. Sorry :(

  • Ianpirro

    javascript:var x= document.getElementsByClassName(“checkbox”); for (y in x){x[y].click()}
    You will have to retype the javascript: again at the beginning because chrome and a few others get rid of it

  • http://www.helpkcy.org/ Moshehackner

    This link worked today for me from the txt file. thanks

You can also find me on Google+ Real Time Web Analytics