Rss Feed
Tweeter button
Facebook button
Linkedin button
Delicious button
Digg button
Stumbleupon button

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!

Buffer
  • Buffa Jf

    I just tried using it again. It isn’t working for me today. CRAP!!!!!!

  • Eddietegone

    i have tried everything that i can think of and nothing is working for me :(
    please help

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

    Eddie – Unfortunately I don’t know a way to make it work for everyone. It is working for most but there are some people that can’t get it to work. 

  • Dukejrent

    My code doesn’t seem to work anymore I keep getting the blank screen to open and it says [object HTML collection] does anyone know what this means??

  • Bubbly026

    Works in Safari :)

  • Wencryo

    Brilliant! Genius. Thank you so much.

  • Leseeus

    oh my gosh this is SO cool- HUGE timesaver!

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

    Bummer, FB must have changed this again as I just got the same message. Meh.

  • Faith White

    Thanks Michelle. It didn’t work the first time, but I will try it again saving the event first so I don’t have to create it again and again. Then try selecting my friends and putting the code in.

    Faith

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

    Faith – it may not work now. I tried to do it today and I got the same message that someone else did a few days back. That message read: [object HTML collection]

  • Faith White

    Yea that’s what I got too. Hopefully someone can come up with a new code or something. I have over 1700 friends and send out a lot of webinar invites. This is really going to hurt.
    Thanks for letting me know.

  • Sinister_gemstone

    i need something for mac please

  • Tanyetta

    thank you!  thank you!  thank you!

  • Jayme

    Weird… I’ve tried it with both… nothing seems to work…. :^(

  • Oliverst14

    mine says object when i hit enter ??????

  • Josleed

    In firefox it’s now going to a new window that says in the top left corner, [object HTMLCollection].  In chrome it’s doing nothing.  It did work since finding this a week or so from the download script js code.  If there’s something else you can figure out, it was great while it lasted.. thanks. 

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

    Appears FB has changed and no longer allows that script to work.

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

    It’s made me very sad too…..so time consuming to do manually.

  • Xclusiveentstl

    I test the limit after you receive error… you can invite up to 29 – 30 people at a time… Can someone create a script that would invite only 29 – 30 friends after and have it run????

  • Elliott

    Anyone get this to work on a mac? Not working for me… tks!

  • Ksvarner

    stopped working… please help!

  • Jeremyrahn

    Does not work as of 6/5/2011

    Any new ideas?

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

    Hopefully someone (a reader maybe??) can write a new script that works with FB’s newest changes.

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

    Elliott – apparently FB made some changes again last week and the script no longer works on PC either. 

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

    Jayme – FB made changes (last week apparently) and the script doesn’t work anymore.

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

    PC isn’t working anymore either due to more changes by FB. (sad face)

  • http://www.facebook.com/TraceyTarrant Tracey Thorpe Tarrant

    It’s been hit and miss for me as to when it works. Hope someone comes up with a new one soon…I sent out a lot of events for clients!

  • vegeta

    not working xD

  • Faith White

    How many facebook friends do you have Francisco?

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

    I see Faith already asked what I was going to ask – how many friends? I tried with just the “first page” of friends and rec’d the error message. Was using FF (not newest version). Will try Chrome too.

  • Spark17972

    can you send me the new link please spark17972@yahoo.com    please!!!!

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

    Spark17972 – sorry, no code to send unless someone who writes javascript can come up with a new working one.

  • Kmb04x

    I got it to work on firefox. Maybe its the new update, but it hadn’t worked for me in a while. Make sure to use the .txt download, and scroll to the bottom of invite list to get it going. It didn’t even process long.

  • http://pulse.yahoo.com/_OU7KRYNLKOKGAUIKEAMH6R3QEM Paul

    New Code:   Just used in Firefox for 5k invites – processed in less than 30 sec on my connection.

    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

    Paul:

    Your timing is perfect and I can try this out today and then update the txt file I have at the top of this post. Thank you!!!!!

  • http://twitter.com/jjvillaescusa Jonathon Villaescusa

    I keep getting a “sending too many invites, please narrow down your search to people who you think will like the event” This is so much bs on Facebook’s part….anyone know the cure for this? Perhaps what triggers facebook to say this? thanks

  • Nridenour

    It did not work for me.

  • Erin Sayer

    This one works…

    javascript:javascript:var elms=document.getElementsByName(“checkableitems[]“);for(var count=0;count<elms.length;count++){var t = setTimeout("elms["+count+"].click()",5000)}

  • DJ Dave

    Still works for me on Safari (used txt file). I have over 2000 friends (aren’t I popular!)

  • Thrillzz5

    Do I Hit enter after i paste it or jus paste??

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

    Yes, hit enter. The script is working for some people and not for others. Hope you are one of the lucky ones.

  • http://twitter.com/stupidDOPE stupidDOPE.com

    I just used the
    javascript:elms=document.getElementsByName(“checkableitems[]“);for (i=0;i<elms.length;i++){if (elms[i].type="checkbox" )elms[i].click()};on our fan page. It worked for us!

  • Anonymous

    Great. Thanks for letting us know!

  • Raindance

    Yo this works like a champ !

  • TheKingofDinosaurs

     This javascript works:

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

  • Jbeags81

    I tried the script in the article and it messed up my whole facebook, no text is showing now, even if i log out and back in or close my browser…it messed up it all! please help!

    email me!

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

    Jbeags – did you clear your cache and try to log back in? As of the last update we put at the top of the post the script wasn’t working. If it’s started working again I am not sure why it would cause the text on your FB profile to vanish. Sorry I can’t be of more help – I’ve never seen this happen.

  • MK

    I love you.

  • 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!!

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