[GET]Javascript for sending Facebook Friend Requests

Great script. Thank you. Everything works perfectly.
But how the script processes such warnings?
View attachment 81764
It may be necessary to add count of this windows and if there will be more than a predetermined value (eg 10), then stop adding friends as it may lead to ban an account.
you can guide me how to use it?
 
you can guide me how to use it?
I think you quoted the wrong one. Or what do you want him to explain to you?

I thought my "how to use" was pretty straight forward, at what step to you struggle?
 
Hey there,

was looking for a Javascript that automatically clicks all 'Add Friend'-buttons it finds on a Facebook page, couldn't find any good one and decided to code one myself.
Perfect for people like me who grow Facebook accounts by hand.


Features:
  • Set how many friends requests you wish to send in total
  • Set delay between two friend requests
  • Overlay that shows how many friend requests have been sent already
  • Doesn't freeze the browser

How to use:
  • Create new bookmark
  • Copy & paste the following code where you would usually put the URL
  • Click the bookmark to send friend requests

Notice: I coded this in in just a few minutes, the code is not a good ecample for best coding practice ;)
Tested in Chrome & Firefox. Please let me know if you encounter any bugs.



Enjoy! :)


Code:
Code:
javascript:
var delayInput = prompt("Delay between actions (ms)", "1000");
var stopAfter = prompt("Stop after how many friend requests are sent?", "100");
var workDelay = parseInt(delayInput, 10);

var loading = document.createElement("div");
loading.setAttribute("id", "noni_loading");
loading.setAttribute("style", "position: fixed; background: rgba(255,255,255,0.8); top: 0; left: 0; width: 100%; font-size: 24px; z-index: 1000; padding: 12px;");
document.body.appendChild(loading);
document.getElementById("noni_loading").innerHTML = "No friends added.";

var inputs = document.querySelectorAll('.FriendRequestAdd:not(.hidden_elem)');


var i=0;
var delay=0;
var cont=true;
var stopAfterNumber=0;
if(parseInt(stopAfter, 10)>inputs.length) {
    stopAfterNumber=inputs.length;
} else {
    stopAfterNumber=parseInt(stopAfter, 10);
}

function addFriends(max){

    if(inputs.length<=0) {
        document.getElementById("noni_loading").setAttribute("style", "position: fixed; background: rgba(140,60,60,0.8); top: 0; left: 0; width: 100%; font-size: 24px; color: #fff; z-index: 1000; padding: 12px;");
        document.getElementById("noni_loading").innerHTML = "No 'Add Friend'-buttons found :(";
   
        alert("That didn't work...");
        document.getElementById("noni_loading").setAttribute("style", "display: none;");
   
    } else {

        if(workDelay <= 0) {
            delay=0;
        } else if(workDelay <= 10) {
            delay=workDelay+(Math.floor((Math.random()*5)));
        } else {
            delay=workDelay+(Math.floor(Math.random()*(0.1*delay))-(0.05*workDelay));
        }

        if(i<stopAfterNumber) {
            inputs[i].click();
            document.getElementById("noni_loading").innerHTML = i+" friends added. "+delay+"ms waiting...";
            cont=true;
        } else {
            document.getElementById("noni_loading").innerHTML = i+" friends successfully added!";
            document.getElementById("noni_loading").setAttribute("style", "position: fixed; background: rgba(60,140,60,0.8); top: 0; left: 0; width: 100%; font-size: 24px; color: #fff; z-index: 1000; padding: 12px;");
            cont=false;
        }

        i++;
        if(cont==true) {
            setTimeout(addFriends, delay);
        } else {
            alert("Success!");
            document.getElementById("noni_loading").setAttribute("style", "display: none;")
        }
    }
}

addFriends();
please give me a tutorial videos using it
 
please give me a tutorial videos using it
I can't speak your language.

- New Bookmark
- Paste Code
- Click Bookmark

If it's really neccessary I may record a quick video coming week but definitely not today.
 
Thank you for your share,very nice post.

An "cancel friend request" wud be amazing also.

Will try to worm a new acc using the settings u guys posted here as "safe" Thank you.
 
Last edited:
I can't speak your language.

- New Bookmark
- Paste Code
- Click Bookmark

If it's really neccessary I may record a quick video coming week but definitely not today.
I do not know where to create bookmarks like, you can take screenshots or a video tutorial
 
Hi,
Thanks for sharing the script It will be a great asset to me.
Thanks again :)
 
@Nonilol thanks for the script, works very well. Did you make the cancel sent friend requests script yet? If not, I can pay you $10 to incentivize you haha, I just need the script asap, you can publish it here too, I don't want to own it privately.
 
Please enter the javascript code that will send the message to all your friends.
 
Hey there,

was looking for a Javascript that automatically clicks all 'Add Friend'-buttons it finds on a Facebook page, couldn't find any good one and decided to code one myself.
Perfect for people like me who grow Facebook accounts by hand.


Features:
  • Set how many friends requests you wish to send in total
  • Set delay between two friend requests
  • Overlay that shows how many friend requests have been sent already
  • Doesn't freeze the browser

How to use:
  • Create new bookmark
  • Copy & paste the following code where you would usually put the URL
  • Click the bookmark to send friend requests

Notice: I coded this in in just a few minutes, the code is not a good ecample for best coding practice ;)
Tested in Chrome & Firefox. Please let me know if you encounter any bugs.



Enjoy! :)


Code:
Code:
javascript:
var delayInput = prompt("Delay between actions (ms)", "1000");
var stopAfter = prompt("Stop after how many friend requests are sent?", "100");
var workDelay = parseInt(delayInput, 10);

var loading = document.createElement("div");
loading.setAttribute("id", "noni_loading");
loading.setAttribute("style", "position: fixed; background: rgba(255,255,255,0.8); top: 0; left: 0; width: 100%; font-size: 24px; z-index: 1000; padding: 12px;");
document.body.appendChild(loading);
document.getElementById("noni_loading").innerHTML = "No friends added.";

var inputs = document.querySelectorAll('.FriendRequestAdd:not(.hidden_elem)');


var i=0;
var delay=0;
var cont=true;
var stopAfterNumber=0;
if(parseInt(stopAfter, 10)>inputs.length) {
    stopAfterNumber=inputs.length;
} else {
    stopAfterNumber=parseInt(stopAfter, 10);
}

function addFriends(max){

    if(inputs.length<=0) {
        document.getElementById("noni_loading").setAttribute("style", "position: fixed; background: rgba(140,60,60,0.8); top: 0; left: 0; width: 100%; font-size: 24px; color: #fff; z-index: 1000; padding: 12px;");
        document.getElementById("noni_loading").innerHTML = "No 'Add Friend'-buttons found :(";
   
        alert("That didn't work...");
        document.getElementById("noni_loading").setAttribute("style", "display: none;");
   
    } else {

        if(workDelay <= 0) {
            delay=0;
        } else if(workDelay <= 10) {
            delay=workDelay+(Math.floor((Math.random()*5)));
        } else {
            delay=workDelay+(Math.floor(Math.random()*(0.1*delay))-(0.05*workDelay));
        }

        if(i<stopAfterNumber) {
            inputs[i].click();
            document.getElementById("noni_loading").innerHTML = i+" friends added. "+delay+"ms waiting...";
            cont=true;
        } else {
            document.getElementById("noni_loading").innerHTML = i+" friends successfully added!";
            document.getElementById("noni_loading").setAttribute("style", "position: fixed; background: rgba(60,140,60,0.8); top: 0; left: 0; width: 100%; font-size: 24px; color: #fff; z-index: 1000; padding: 12px;");
            cont=false;
        }

        i++;
        if(cont==true) {
            setTimeout(addFriends, delay);
        } else {
            alert("Success!");
            document.getElementById("noni_loading").setAttribute("style", "display: none;")
        }
    }
}

addFriends();


this js for dekstop version, can you help me to make this js in mobile version? thanksyou before

fgjkjk.png
 
Good idea actually!
I still haven't found time to work on this, but it's on my list.
Hi first i wnt to say grate script and Thanks for it it works very good and second I wnt to ask did you doing any modifications to it as you planed.Thanks in Advance
 
Thanks for the script, I'll try it out later. If you're busy with other things. And since a lot of other people are asking. Can I make a video on how to use it?

I agree though that the how to is pretty straightforward...
 
Thanks for the script
 
Last edited:
Back
Top