Facebook Auto Accept Requests
If you think about it, if you’ve got a fake Facebook profile that you wish to develop (like I do), then you have every reason to wish to create the most possible noise around your profile. That implies, of course, accepting every friend request, but also, every group request and every event invitation.
var inputbuttons = $$('input.inputbutton');
for (var i = 0; i < inputbuttons.length; i++){
if (inputbuttons[i].value=="Confirm"){
inputbuttons[i].click();
}
}
var inputsubmits = $$('input.inputsubmit');
for (var i = 0; i < inputsubmits.length; i++){
if (inputsubmits[i].value=="Attending"){
inputsubmits[i].click();
}
}
You could also wish to accept every application invite, but it would be much harder to do (clicking on an Add App button brings you to a different page), so I didn’t bother. So, to clean your requests page from applications invites after you’ve run the script above, you can use the second for loop from there:
var inputbuttons = $$('input.inputbutton');
for (var i = 0; i < inputbuttons.length; i++){
if (inputbuttons[i].value=="Ignore"){
inputbuttons[i].click();
}
}
Note: this script follows my original Add Friends and Ignore Requests scripts.
February 22nd, 2008 at 4:01 pm
Around Feb. 21 this method was broken, probably because Facebook’s definition of the double dollar $$() javascript function was changed.
The remedy for that is to define your own double dollar function (which is a CSS element selector).
You can use this one:
function $$(selector){ var i; var s=[]; var selid=""; var selclass=""; var tag=selector; var objlist=[]; if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" s=selector.split(" "); var fs=s[0].split("#"); if(fs.length==1) return(objlist); return(document.getElementById(fs[1]).getElementsByTagName(s[1])); } if(selector.indexOf("#")>0){ //id selector like "tag#id" s=selector.split("#"); tag=s[0]; selid=s[1]; } if(selid!=""){ objlist.push(document.getElementById(selid)); return(objlist); } if(selector.indexOf(".")>0){ //class selector like "tag.class" s=selector.split("."); tag=s[0]; selclass=s[1]; } var v=document.getElementsByTagName(tag); // tag selector like "tag" if(selclass=="") return(v); for(i=0;i < v.length;i++){ if(v[i].className==selclass){ objlist.push(v[i]); } } return(objlist); }February 24th, 2008 at 2:20 am
Hey i have greasemonkey
but i dont know how to implement or use this script.
What do i have to do to make it a .js or whatevers needed to install this script on greasemonkey?
Please help!
thanks
February 28th, 2008 at 6:56 am
Hey,
I finally wrote a Greasemonkey script for this: it can be found at http://userscripts.org/scripts/show/23345, or directly here at http://blog.mapmyglobe.com/gmscripts/facebook-auto-confirm-friend-requests.user.js
Cheers
April 2nd, 2008 at 5:25 am
thank you =)
July 4th, 2008 at 12:46 pm
grease monkey??? but what about a mozilla firefox :p
July 29th, 2008 at 1:45 am
GreaseMonkey is a firefox only addon.
December 29th, 2008 at 6:37 am
Hi I installed greasemonkey and so on in mozilla firefox but it seems that somewhat has changed in facebook and that’s why the reqs can’t be autoaccepted.
Does anyone have the same problem??
January 5th, 2009 at 5:36 am
Yes. Doesnt work.
January 9th, 2009 at 3:56 pm
Well I have a question to make about this script. It can only accept friend requests without accepting other requests? And does it work without logging in? F.e if i do not log in for a month (in FaceBook, but still using internet and Firefox) will it auto accept Friend Requests? It works only with Grease monkey? Plz answer i got a major problem and your answers will be crucial. Ty in advance
February 17th, 2009 at 11:56 pm
After adding Greasemonkey, the direct link to the js file worked great. I had to manually delete part of the web address to match what the instructions said. But after that, it managed to auto accept 150 friends before I had to refresh the page.
February 18th, 2009 at 4:06 am
now I just need a script to accept 2 invites, buy the special property and buy the special item.
April 1st, 2009 at 2:44 am
Will it possible to make this script refresh your Facebook Homepage & autodetect if there is a new “friend request” flag?
When it detects it, it will automatically goes to /req.php page then confirms all those friends.
At the moment, I need to click the /req.php#friends link first then refresh twice then the script will work. *sigh*
Thanx
April 16th, 2009 at 4:43 pm
Thank a lot! That was a life saver.
April 27th, 2009 at 2:49 pm
Where are the instructions as said above, I’ve just installed greasemonkey and installed the script - how do I run it?
June 19th, 2009 at 5:10 am
Doesn’t work!