1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Here is a simple Javascript to add 50 people at once.

Discussion in 'FaceBook' started by kitteh101, Nov 3, 2015.

  1. kitteh101

    kitteh101 Regular Member

    Joined:
    Jan 17, 2012
    Messages:
    363
    Likes Received:
    53
    Occupation:
    Consultant
    Location:
    International
    In the search bar type "People who are not my friends but like marketing and internet marketing" (replace marketing/internet marketing with niche)

    Click "see more" and load up some people

    While in firefox press CTRL + SHIFT + K

    Code:
    javascript:var  inputs = document.getElementsByClassName('_42ft _4jy0 FriendRequestAdd  addButton _4jy3 _517h'); for(var i=0; i<inputs.length;i++) {  inputs[i].click();
    
     }

    Can somebody who knows javascript make a script that will cancel all sent friend request in this same manner?


    I have been using a X Y axis mouse clicker to do this previously........
     
  2. kitteh101

    kitteh101 Regular Member

    Joined:
    Jan 17, 2012
    Messages:
    363
    Likes Received:
    53
    Occupation:
    Consultant
    Location:
    International
    Wow i was using this all day yesturday no problem ......... but i just did it and it added 4 people and facebook said im blocked from adding because i was going to fast!!!!!!!

    I guess my X Y axis wasnt so bad after all because i can add like 250 a day without a ban with that method.

    DONT USE THIS METHOD i wish i could delete it.
     
  3. RightFootFanatic

    RightFootFanatic Regular Member

    Joined:
    May 31, 2015
    Messages:
    347
    Likes Received:
    192
    Occupation:
    DevOps
    Location:
    Whimsyshire
    You could try something like this to avoid a ban:

    Code:
        var inputs        = document.getElementsByClassName('_42ft _4jy0 FriendRequestAdd  addButton _4jy3 _517h'); 
        var addCount    = 0;
        
        var addFriends     = setInterval(function(){ 
            if (addCount<inputs.length) {
                inputs[addCount].click();
                addCount++;
            }
            else {
                clearInterval(addFriends);
            }
        }, 10000);
    
    
    The add code runs every 10 seconds as long as the count from input is reached. You can change the execution time from 10 seconds by changing the 10000 ms. Interval time is set in milliseconds, so 1s = 1000ms.
    Not tested, but if the previous code worked this should do.
     
  4. TheProfessor2015

    TheProfessor2015 Junior Member

    Joined:
    Sep 20, 2015
    Messages:
    144
    Likes Received:
    7

    Has this been tested?
     
  5. TheProfessor2015

    TheProfessor2015 Junior Member

    Joined:
    Sep 20, 2015
    Messages:
    144
    Likes Received:
    7
    Whats your X Y axis method? You can add 250 per day without a ban?
     
  6. CerosYUnos

    CerosYUnos Newbie

    Joined:
    Oct 5, 2015
    Messages:
    20
    Likes Received:
    18
    Ya, same thing here.(BTW can't pm cause, not enough post, hmu on IG BlessFamous)

     
  7. kitteh101

    kitteh101 Regular Member

    Joined:
    Jan 17, 2012
    Messages:
    363
    Likes Received:
    53
    Occupation:
    Consultant
    Location:
    International
    You should just google autohotkey.
     
  8. difurlan

    difurlan Newbie

    Joined:
    Sep 22, 2016
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male

    Man, fantastic code. But, i m looking for a code that could inspect the button and if the button is clicked already (or disabled), the code pass by that button, cause I think the facebook count that click on the button that is clicked (or disabled) already.

    For example:


    javascript:var inputs = document.querySelectorAll('a._42ft._4jy0._4jy3._517h');
    var cont=0;

    var addFriends = setInterval(function(){

    if (cont<inputs.length) {

    if (!(inputs[cont] == disabled)) { //something like this
    inputs[cont].click();
    cont=cont+1; }
    }

    else { clearInterval(addFriends);

    }

    }, 3000);