MapMyGlobe

Facebook Auto Ignore Requests

If 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, you’ll know why — see my profile badge below :) . This script is great, the only thing is that when you have lots of friends, you also get lots and lots of invitations to groups, 3rd party applications and the like. You could just let these accumulate in your requests page, but after a while this page will take forever to load and that’s annoying.

So I extented the script to do a second pass and automatically ignore every invitation sent to you. That way, your requests page will be clean again. Here is the code:

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();
    }
  }
}

var inputbuttons = $$('input.inputbutton');
for (var i = 0; i < inputbuttons.length; i++){
  if (inputbuttons[i].value=="Ignore"){
    inputbuttons[i].click();
  }
}

If you’re French, here is the profile I am talking about :)
Jean-Claude Dusse's Facebook profile

5 Responses to “Facebook Auto Ignore Requests”

  1. Julien Says:

    Actually, as everything is asynchronous, you’d better first add friends, and only then refuse everything else, or you could ignore friendship requests.

  2. Eric M Says:

    So, this also ignores friendship requests too then? I’m looking for something that only ignores application requests and invites, but keeps the friendship requests and notifications for when I have a message.

  3. Julien Says:

    No, if you run the first for loop, and then the second, it will accept all friend requests, but ignore all other requests. Message notifications are independent from all that.

  4. Julien Says:

    Update: a newer, more “socially optimal” version of this script is at http://blog.mapmyglobe.com/facebook-auto-accept-requests/

  5. Julien Says:

    Facebook’s double dollar $$() javascript function has been changed. Please see my comment on http://blog.mapmyglobe.com/facebook-auto-accept-requests/ for a remedy to that problem :)

Leave a Reply