Skip to content

Instantly share code, notes, and snippets.

@SwapnilSoni1999
Created April 19, 2019 08:55
Show Gist options
  • Save SwapnilSoni1999/31e8413440f26d13b9bed4340c3f8d97 to your computer and use it in GitHub Desktop.
Save SwapnilSoni1999/31e8413440f26d13b9bed4340c3f8d97 to your computer and use it in GitHub Desktop.
Facebook Auto Friend Request Accepter
/*
Open https://www.facebook.com/friends/requests and make sure theres no queries passed after /request
(like /requests?someQueryName=) it should be plain URL. Then open Browser Developer Console and
paste this code and Press Enter Key it will Automatically accept length of the request
(usually around 40-50 person)
Then you have to refresh again to do the thing so.
(C) Swapnil Soni (https://github.com/SwapnilSoni1999)
*/
var i = 0;
var len = document.querySelector('div.phl').children.length;
acceptReq(i, len);
function acceptReq(start, end) {
var handler = setInterval(function() {
console.log("Accepting Request of : ", document.querySelector('div.phl').children[start].children[1].children[0].children[0].children[0].children[0].children[0].children[0].innerText);
document.querySelector('div.phl').children[start].children[1].children[0].children[1].children[0].children[0].children[0].click();
start++;
if(start > end -2) {
clearInterval(handler);
}
}, 500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment