Note: I am aware that this doesn’t work anymore, but I’m leaving it posted in case someone can use the information below to figure out a new working method to select all facebook friends. Please don’t comment telling me it doesn’t work… I already know this and I am as frustrated as everyone else about it. If you do discover a solution, please let me know via comment and I’ll gladly publish your method to help others having the same issue.

I don’t normally post code suggestions on my blog, but this is something I have invented myself (based on ideas found on other’s webpages) and it seems too good not to share. If you like it, please feel free to link to my page, but don’t just copy paste my page!

Note: This method is not the same as other pages, it is updated and optimized. Several other websites suggest code which selects ALL your friends (even the ones that are already part of the group you’re inviting them to). The code below uses their methods but with an extra filter so it only selects the friends that need to still be invited. The difference in speed is very noticeable. The older method can take quite a while to cycle through hundreds of friends, while my method simply selects the few that need to be selected!

As we all know, there’s no built-in way to select all your friends. For me, this posed a problem because I have a personal Facebook page as well as the The Creative Music DJ (CMDJs) Facebook page. At times, I’d like to invite friends of my personal page to also join my CMDJs page. Here’s how I’ve found to do it, using Firefox. If you use IE or Chrome, your mileage may vary but I believe it will be similar.

First, select your company/group page, then click Suggest To Friends. When your Facebook Friends box pops up, right click on any friend, and select Open Link In New Tab.

select all your friends in facebook Facebook Select All Friends

Once you’ve opened your new tab, you’ll see a strange sight. Your Facebook Friends box will be on the left of a large web page like this.

Select all friends in facebook1 Facebook Select All Friends
If you see something similar to the above you’re on the right track. Now, paste the following code into the Address bar.

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

Hit Enter, and watch the magic. Your non-gray friends will all be selected auto-magically! Now just click Send Invitations and you’re done!

If you enjoyed this tip, please share it, and invite me as a friend on Facebook (http://www.facebook.com/djdennisj).

Note: I am aware that this doesn’t work anymore, but I’m leaving it posted in case someone can use the information below to figure out a new working method to select all facebook friends. Please don’t comment telling me it doesn’t work… I already know this and I am as frustrated as everyone else about it. If you do discover a solution, please let me know via comment and I’ll gladly publish your method to help others having the same issue.

Additional note: Please do not use this knowledge for evil. If you’re a spammer, you’re scum of the earth and everyone hates you and what you do. I don’t want to be responsible for your wrongdoings. This knowledge is being shared for those that have a legitimate need to invite their friends to become part of their company’s fan page.