If you have a popular Facebook group where you receive hundreds of membership requests then it becomes a tough job to accept all of them one by one.
You may already know about the "Select All Friends" code using which you can select all your friends to invite them to a Facebook event. We covered that topic in this post:
http://www.stramaxon.com/2012/02/how-to-select-all-friends-at-once-to.html
I wanted to post less on Facebook's topic but as you know it's a hot topic so one in a month is not a big problem.
You may already know about the "Select All Friends" code using which you can select all your friends to invite them to a Facebook event. We covered that topic in this post:
http://www.stramaxon.com/2012/02/how-to-select-all-friends-at-once-to.html
Facebook now provides a new "Add All" function for confirming all group membership requests at once, so there's no need to use this trick/code.
I wanted to post less on Facebook's topic but as you know it's a hot topic so one in a month is not a big problem.
Anyways, let's get back to the main topic, how would you accept multiple group requests at once. Actually you can disable the approval system for group request but that will enable everyone to join the group, fake and spam profiles too. Such profiles don't target groups with approval system turned-on.
How do you do that ?
The trick is to manipulate clicks on selected buttons using JavaScript. JavaScript is webpage scripting language and you can manipulated static pages by running scripts.But to run the script you have to open the Developer Tools in your browser, it's not present in old and even some new browsers. I recommend Chrome, Safari or Mozilla - the latest version.
Code
Update: Facebook recently changed the layout of it's group membership request page, so the old code stopped working. I have updated the code which works with the current site. Thanks to A Suzy Meow for informing us about this change.
Copy this small code :
javascript:var cont = document.getElementById('Group_member_request_pagelet'); var ul = cont.childNodes[0]; var li = ul.getElementsByTagName('li'); // iterate on this for (var i = 0; i < li.length; i++) { var btnCont = li[i].getElementsByClassName('rfloat'); var ancHors = btnCont[0].getElementsByTagName('a'); ancHors[0].click(); // make the click }
The code tells the browser click on the "Add" button next to each item (membership request item) in the list.
How to use the code?
For a person not familiar with scripting consoles, it might be tough for them to run the code. I wrote a step-by-step tutorial to make it easy for you :
- Open the membership request page of the group in a modern web browser (Chrome, Firefox or Safari)
- To open script console on different browsers :
- Google Chrome - press CTRL+SHIFT+J
- Mozilla Firefox - press CTRL+SHIFT+K
- Apple Safari - press CTRL + ALT + I and when the developer tools appear, press ESC or click "Show Console" button to bring up the Console window
- If you still didn't understand how to use the console, this article has more for you to learn and understand how to use Developer Tools Console.
- Once you have opened the Console in your browser, paste the JavaScript code (provided above) and hit enter. When you paste the code inside the console it would look like this (The code you must enter is not the same as shown in the picture) :
- Just hit enter and the code will start doing it's job. It will automatically click on every "Confirm" button one-by-one on the group membership approval page until the number of buttons becomes 0.
This code is very similar to the code to select multiple friends at once for Facebook events but with a little modification it works like a charm on membership confirmation.
For any queries use the comment form below :) And thanks for reading.