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