MapMyGlobe

Facebook Auto Add Friends

For all of you GreaseMonkey and Bookmarklets aficionados who get added on Facebook a lot, here’s a quick snippet I wrote to confirm all friend requests at once (Facebook’s interface normally has you click on confirm and ask for details for each friend which is a pain):

var inputbuttons = $$('input.inputbutton');
for (var i = 0; i < inputbuttons.length; i++){
  if (inputbuttons[i].value=="Confirm"){
    if (inputbuttons[i].attributes['onclick'].value.substring(8,24)
                                               == "click_add_friend"){
      inputbuttons[i].click();
    }
  }
}

Update: I’ve extended this script to automatically ignore all other requests (invitations to groups, applications…). See the updated script at Facebook Auto Requests Ignore.

10 Responses to “Facebook Auto Add Friends”

  1. Tracy Says:

    How do you install it?

  2. Julien Says:

    This is a javascript that you need your browser to run each time you are on Facebook’s request page. Either manually paste it into the javascript console, or look into the two links I mentioned at the start of the article.

  3. Facebook Auto Ignore Requests | Blog - MapMyGlobe Says:

    […] you’ve read my page on Facebook Auto Add Friends you know that I have a fake profile on Facebook that gets added a lot. If you’re French, […]

  4. Lucy Says:

    I cant get this to work in Greasemonkey and I have 1000 friend requests to accept.

    Is it possible to make one which is a file you install?

    Thanks

  5. Julien Says:

    See my comment on http://blog.mapmyglobe.com/facebook-auto-accept-requests/ for a fix.

    As for the Greasemonkey script, I’ll write one some day. For now you can run it inside a javascript console.

  6. Julien Says:

    Oh and by the way: don’t forget you’ve got a 5,000 friends limit on Facebook !! :D

  7. Lucy Says:

    Ok so how do I install the fix?

    Its not working, its really annoying.

    I gather I put the script in the includes section but whats the excludes and Namespace?

    Thank you so much.

  8. Julien Says:

    @Lucy:
    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

    Note that it also accept any Group request.

  9. marco perez Says:

    umm speaking of auto add friend… umm where would i put this code :P

  10. add friends to myspace Says:

    check this out http://www.myspace2max.com

Leave a Reply