Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I am admin of an event and would like to invite the members of one "friend list" to this event.

In the "Invite Friends" dialog I selected the list (using the dropdown menu), so that it only shows members of this list. Now is there a way to select everybody displayed?

Do I have to select them one-by-one?

I saw some invite-all-friends JavaScript code, but will this select only people in the selected friend list? I don't want to invite the others.

invite friends

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The code you mentioned does not work as Facebook UI has changed and it will continue to change. Nevertheless,

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

Source: http://olivo.net/2011/04/how-to-invite-all-your-facebook-friends-to-an-event-at-once-code-has-changed/

Should do the trick. It works on the currently selected list. The above should not break in any future builds though as the only input elements on the page are your Facebook friends.

share|improve this answer
    
This code needs to be pasted in the browser's URL bar after having the list open in the invitation dialog. If the list is long, scroll to the bottom of it, so that all elements get loaded. Does not work in Firefox but works in Chrome (Chrome removes the javascript: part automatically so you will have to retype it). –  nic Feb 11 '13 at 15:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.