UPDATE 2: Still a lot of visitors come to my site, so I decided to update the code to a newer one which works as of November 2011. It’s worth to mention that executing Javascript directly in the URL field is not supported for all browsers. It should work in Google Chrome, there is now even an extension for this feature called Facebook Super Select All. Thanks for the contribution in the comments!
UPDATE 1: After this post was originally written, Facebook came up with a solution to create lists of friends. You can create several lists, based on your own personal criterias, and add your friends to different lists, which you then can send event or page invitations to. I would rather recommend using this solution provided by Facebook, so that you don’t send information which might not apply to all of your friends.
To create a list, go to your Account settings, choose Edit Friends and Create new list. After you’ve created new lists you have an option to filter friends based on list names when you’re inviting friends to events or pages.
The newly redesigned Facebook has led inviting members to an event/group/page to an even more complex process. Why can’t they just make a “select all” button? Initially I got tired of clicking several hundred times on all the pictures to invite people to my event, so I came up with this small piece of Javascript:
Go to your event/group/page, click invite people and then paste this snippet in the URL field of your browser.
Left-click the mouse in the URL field and hit Enter. Your invitations will not be sent yet, but all your friends will be selected. Click the “Invite” or “Send” button on the Facebook page to finally send the invites.
Soi! Done in one go
October 20th, 2011 at 20 October, 2011
it doesnt work???????????????????
October 30th, 2011 at 30 October, 2011
This method doesnt work anymore, however i have found a new way that does with firefox: http://www.hussainhusain.com/2011/10/select-friends-invite-event-page-facebook/
October 31st, 2011 at 31 October, 2011
Just get the “facebook invite all” extension in chrome. so much easier than all this link crap.
November 3rd, 2011 at 3 November, 2011
I can confirm that
javascript:elms=document.querySelectorAll(‘.fbProfileBrowserListContainer input’);for(var fid in elms){elms[fid].click();}
worked for me, just now. When pasting this into your URL bar make sure that you replace the pasted single quotes with real single quotes otherwise you’ll cause a javascript syntax error.
Also Firefox doesn’t allow you to execute javascript in the URL bar by default, you could install a plugin like firebird(which gives you alot more control) or overwrite this default behaviour by setting “noscript.allowURLBarJS” to true on the about:config page.
November 4th, 2011 at 4 November, 2011
My non music/band page has almost filled up, I created a group page (account on Facebook) as of 11-3-11.
I have 4000 friends, I have tried using javascript codes to add all friends to a mail-out to request them all to “like” etc my new group page but I have no idea how to do it, can anyone help? It’s driving me nuts.
B
November 9th, 2011 at 9 November, 2011
Great stuff! Thanks for sharing this. Very helpful and time saving!! So long all the clicking!
November 10th, 2011 at 10 November, 2011
Just tested it and it works like a charm!
November 14th, 2011 at 14 November, 2011
how do you do it ????????????? i can’t do it at ALL!!!!!!!!!!!!
November 14th, 2011 at 14 November, 2011
NEVER using this website Waaaaaaaaaaaaaaaaaaaaaaaaaaaaa!!
November 14th, 2011 at 14 November, 2011
it works like a charm with many facebook features but not with groups unfortunately. in the new layout, facebook groups doesn’t pop out a list of friends but just a single field where you can write down your friends’ names and facebook autotags them. when there is no list of friends there is no way of selecting them all. anybody knows a solution for this?
November 15th, 2011 at 15 November, 2011
Kind of works!! Seems to only select friends that are viewable in the ‘invite friends’ box at the time, so i had to select them, click submit, go back into ‘invite friends’ scroll down to unselected friends and repeat the process…any way to solve that issue?
November 15th, 2011 at 15 November, 2011
Doesnt even work =/
November 17th, 2011 at 17 November, 2011
YOU ARE FUCKING GOD
THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU
November 17th, 2011 at 17 November, 2011
Thank you thank you thank you!!!!!!!!!!!!
November 18th, 2011 at 18 November, 2011
Fantastic !!
Just wondering is there any way, we can select all friends only from a particular list?
It will be marvelous if we can do that too.
thanks anyway !
November 18th, 2011 at 18 November, 2011
Even after 2 years it still works! nice work!
November 18th, 2011 at 18 November, 2011
Excellent tip on page invitation, I have a more than 2000 contacts so it was so much difficult for me to select all contacts, I have search this on Google and found your post. Excellent sharing dude. Keep writing on informative posts.
November 23rd, 2011 at 23 November, 2011
This page shows you how to do it:
Tested and worked on 11/22/2011
http://www.facebook.com/pages/The-Web-Developers-Way-To-Invite-All-Friends-To-A-Page/241658975889650
November 23rd, 2011 at 23 November, 2011
This is awesome u saved me alot of time Thanks
November 25th, 2011 at 25 November, 2011
when ever I put it in to my URL on GoogleChrome it just google searches – takes me away from the event page and onto google and this page is top of the search list? why won’t it work for me?
November 27th, 2011 at 27 November, 2011
um maybe if you only had 100 friends, it will select everyone. it only selects 100 people at a time so you would have to do that 15 times if you had 1500 and wanted to invite EVERYONE. FAIL
November 28th, 2011 at 28 November, 2011
Okay, when you put the script make sure to add “javascript:” on the first one . because other browsers wont let you paste “javascript:” word so you have to review your codes.
November 29th, 2011 at 29 November, 2011
0mg thank you so much ! ! ! works on Mac’s also guys!!!!!!!
November 29th, 2011 at 29 November, 2011
All it is doing is bringing me to this google page when I hit, “enter”. what am I doing wrong? the instructions seem pretty easy…
December 2nd, 2011 at 2 December, 2011
Thank you, thank you and thank you!
December 2nd, 2011 at 2 December, 2011
Thank you. It works well on Firefox and IE. But not on Chrome.
I just made a video on this too:-
http://youtu.be/VRR-5BX8sfo
Thanks buddy!
December 2nd, 2011 at 2 December, 2011
You are a complete legend! Thank you so much!
December 4th, 2011 at 4 December, 2011
it didnt work with me
my browser is chrome
what do i do??
December 5th, 2011 at 5 December, 2011
nivite friends
December 5th, 2011 at 5 December, 2011
Check this for doing this with Mozilla Firefox!
How to invite all your friends to any event, group or page on Facebook with Mozilla Firefox version 6, 7 or 8+.
http://www.facebook.com/pages/The-Select-All-Friends-code-for-Mozilla-Firefox-6/305854052767978
December 6th, 2011 at 6 December, 2011
good boy Dude !!! thanks for all
December 7th, 2011 at 7 December, 2011
Question: Does this work with Internet Explorer, which is the browser I use? Maybe that’s the problem. I’ve read all the instructions. I opened “invite friends” then scrolled through the entire list (which wasn’t in the original instructions). Then I pasted the code into the browser bar, as illustrated on the instructions, and hit enter. This takes me to a Bing page. When I hit the back button to go back to my event page, the “invite friends” window is closed – and when I open it, I’m back where I started from with no friends selected. Frustrating!
December 10th, 2011 at 10 December, 2011
This wont work for me on Google Chrome, it always does a google search instead… any advice?
December 11th, 2011 at 11 December, 2011
ya it works, thanks… you should use firebug on firefox….
old style like pasting on address bar wont work….
happy facebooking…:D
December 12th, 2011 at 12 December, 2011
Is there a different step for mac users? It keeps taking me to the google search page
December 13th, 2011 at 13 December, 2011
You just made my night omg!! Thank you!! =)
December 16th, 2011 at 16 December, 2011
It would be nice to have a select all button once again. Perhaps they will but it into the new version…
December 20th, 2011 at 20 December, 2011
I cant get it working?!
December 21st, 2011 at 21 December, 2011
Its Really Cool. I like It………..
December 21st, 2011 at 21 December, 2011
Большое спасибо.
December 22nd, 2011 at 22 December, 2011
JordFrewich then just use FireFox. The way that symon descibes on his fanpage works. But you may have to restart your browser after you do it because facebook seems to stop working right after this procedure until you restart browser
December 22nd, 2011 at 22 December, 2011
my facebook doesnot work because of javascript what i can do???????
December 24th, 2011 at 24 December, 2011
Would love to tell you this works.. pasting the java in adress bar Chrome, Firefox just brings up your default search engine page’s results for that command ie Google page for your link.. is it me? edumecate me yeah – Happy New year (Year of the Dragon) should be a good one
December 27th, 2011 at 27 December, 2011
javascript:var x=document.getElementsByTagName(“input”);for(var i=0;i<x.length;i++) {if (x[i].type == 'checkbox') {x[i].click();}};
December 27th, 2011 at 27 December, 2011
javascript:var x=document.getElementsByTagName(“input”);for(var i=0;i<x.length;i++) {if (x[i].type == 'checkbox') {x[i].click();}};
this is not workkkkkkkkk
December 27th, 2011 at 27 December, 2011
plz just paste hearrrr just just code
January 2nd, 2012 at 2 January, 2012
thanks for the update!
works like a charm!
January 3rd, 2012 at 3 January, 2012
To make this script work in Chrome you have to open up ‘Developer Tools’ and paste the code into the Javascript terminal (minus the ‘javascript:’ part).
January 7th, 2012 at 7 January, 2012
That is awesome thanks
I found this useful article to use too
http://codingninja.net/article/117/How-To-Invite-All-Of-Your-Friends-On-Facebook
January 7th, 2012 at 7 January, 2012
BETTER WAY IS THIS
WORKS 100% =)
http://www.facebook.com/pages/How-to-invite-all-your-friends-/319155004791212