MapMyGlobe

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.

15 Responses to “Facebook Auto Accept Requests”

  1. Julien Says:

    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);
    }
    
  2. chingy Says:

    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

  3. Julien Says:

    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

  4. chingy Says:

    thank you =)

  5. marco perez Says:

    grease monkey??? but what about a mozilla firefox :p

  6. WoOpin Says:

    GreaseMonkey is a firefox only addon.

  7. MaX Says:

    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??

  8. Istok Says:

    Yes. Doesnt work.

  9. VinCeNt. Says:

    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

  10. petey Says:

    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.

  11. Rich Says:

    now I just need a script to accept 2 invites, buy the special property and buy the special item.

  12. Vinx Says:

    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

  13. Charley Bach Says:

    Thank a lot! That was a life saver.

  14. Cindy Says:

    Where are the instructions as said above, I’ve just installed greasemonkey and installed the script - how do I run it?

  15. bernd Says:

    Doesn’t work!

Leave a Reply