(This is old. It probably doesn’t work on Facebook anymore.)
Facebook unfortunately requires one to first individually delete users from a group before one can effectively delete the group. If you have thousands of users, this is a pain. You can use the following bookmarklet (I’ve only tested it in Google Chrome) to quickly delete about 100 users. Unfortunately, WordPress.com does not allow me to have drag-and-drop bookmarklet links in my post, so you’ll have to follow these directions:
- Copy the text from here.
- Create a new bookmark in Google Chrome and paste the text into the URL.
- Go to the admin page that lists users from your Facebook group and click the bookmarklet.
- When you are directed to the next page of users, click it again.
- To speed up the process even more, use multiple tabs on different pages.
For those interested, here is the code (I minified it using YUI Compressor for the bookmarklet):
function confirmDeleteUser() {
confirmButton = document.querySelector('.uiButton.uiButtonLarge.uiButtonConfirm input');
if(!confirmButton) {
setTimeout('deleteAllUsersInGroup()',200);
return;
}
mouseClickEvent = document.createEvent('MouseEvent');
mouseClickEvent.initMouseEvent('click',true,true);
confirmButton.dispatchEvent(mouseClickEvent);
setTimeout('deleteAllUsersInGroup()',200);
}
function switchPage() {
pageButton = document.querySelector('.next.uiButton:not(.uiButtonDisabled)');
if(!pageButton) {
pageButton = document.querySelector('.prev.uiButton:not(.uiButtonDisabled)');
}
if(!pageButton) {
return
}
mouseClickEvent = document.createEvent('MouseEvent');
mouseClickEvent.initMouseEvent('click',true,true);
pageButton.dispatchEvent(mouseClickEvent);
}
function deleteAllUsersInGroup() {
/* I pick a random user to account for some quirks in the process */
deleteButtons = document.querySelectorAll('a.UIImageBlock_Ext.uiCloseButton.uiCloseButtonSmall');
if(!deleteButtons.length) {
setTimeout('confirmDeleteUser()',500); /* Usually one last dialog to clear */
setTimeout('switchPage()',1500);
return;
}
deleteButton = deleteButtons.item(Math.floor(Math.random() * deleteButtons.length))
mouseClickEvent = document.createEvent('MouseEvent');
mouseClickEvent.initMouseEvent('click',true,true);
deleteButton.dispatchEvent(mouseClickEvent);
deleteButton.parentNode.parentNode.removeChild(deleteButton.parentNode)
setTimeout('confirmDeleteUser()',200);
};
deleteAllUsersInGroup();