Last active
August 29, 2015 14:07
-
-
Save agungf/e850ed54c559baa531c7 to your computer and use it in GitHub Desktop.
FB panpage auto invite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//click all friends link | |
var allFriends = document.getElementsByClassName('_5tef'); | |
for(var i=0; i<allFriends.length;i++) { | |
allFriends[i].click(); | |
console.log("allFriends link clicked!"); | |
} | |
//scroll down every seconds | |
var showAll = setInterval(function() { | |
var objDiv = document.getElementsByClassName('_5tee'); | |
var elements = objDiv[0].getElementsByTagName('li'); | |
elements[elements.length - 1].scrollIntoView(); | |
console.log("total friends displayed: "); | |
console.log(elements.length - 1); | |
}, 1000); | |
//delay invites for a minutes | |
setTimeout(function(){ | |
console.log("processing to click invite buttons....."); | |
//stop scrolling | |
clearInterval(showAll); | |
//click every invites every second | |
var inputs = document.getElementsByClassName('_4jy0 _4jy3 _517h _42ft'); | |
var clicked = 0; | |
for(var i=0; i<inputs.length;i++) { | |
inputs[i].click(); | |
clicked++; | |
console.log(i+" ok!"); | |
} | |
console.log(clicked+" clicked to invite!"); | |
console.log("done !"); | |
}, 60*1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note
What it does?
Inviting as much as possible friends to your FB fan page.
How to:
Scripts steps: