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.

31 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!

  16. Bill Bartmann Says:

    I’m so glad I found this site…Keep up the good work

  17. Sophie Says:

    Very good and useful script !

    Thanks a lot

  18. Steve R Says:

    …sorry to be a pain and nubie,
    can you please add a sample of what I need to add such friends to a particular friend group, such as “MAFIA”
    this would be most helpful in organising my feeds.
    cheers!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  19. Steve R Says:

    ….surely someone in cyber space can throw some script at me??? ….do I need to donate some money in your PayPal account??

  20. Aaron S Says:

    Here’s a quick javascript snippet that I wrote. I got tired of doing them all manually. Just create a bookmarklet with the code inside to ignore all requests (this will ignore friend requests too, so make sure you take care of those first). If there is any desire for it, I’ll update it to accept friend requests first.

    javascript:{var a = document.getElementsByTagName(’input’);for (var i=0; i

  21. Aaron S Says:

    javascript:{var a = document.getElementsByTagName(’input’);for (var i=0; i

  22. Aaron S Says:

    OK. It won’t let me paste here. You can find it at

    http://userscripts.org/scripts/source/62489.user.js

  23. rambo Says:

    hey good job - but if i wanna auto accept for example playing games in on from the FB such as premier football - can u guys show me - tks

  24. boa Says:

    hey, this doesn’t works in firefox 3.5.8 and 3.6
    only accpet one, and the other still get nothing happen.
    would you fix it?
    thanks

  25. Andrea Longsdorf Says:

    Hey, I found this blog post while searching for help with JavaScript. I’ve recently changed browsers from Opera to Microsoft Internet Explorer 5. Just recently I seem to have a problem with loading JavaScript. Every time I browse page that requires Javascript, the page does not load and I get a “runtime error javascript.JSException: Unknown name”. I can’t seem to find out how to fix the problem. Any aid is greatly appreciated! Thanks

  26. Julien Says:

    Update April 18, 2010 : the script STILL DOES WORK. Pretty cool, huh ? ;)

  27. Wine Blog Says:

    Maybe I’m missing the point, but why would you want an application to auto-accept friend and application requests, are you not going to be inundated with bots and publicists?

  28. Facebook Auto Accept All Friend Request | Fan Page Tube Says:

    […] http://blog.mapmyglobe.com/facebook-auto-accept-requests/ […]

  29. monirul Says:

    its not working..can anyone send me details abt it monirul_mask@yahoo.com

  30. RawShark Says:

    Yes, looks like FB have changed the rules…again :(

  31. sebastian Says:

    Muy buen articulo es bueno conectarce y trabajar asi

Leave a Reply