Facebook invite people, who liked the post

Edgar Kussberg
2016-11-17T08:57:27Z

invite_post_likers.js

| function invitePeople() {
| // Invite first page users
| var inputs = document.querySelectorAll('div._4t2a a._42ft._4jy0._4jy3._517h');
| for(var i=1; i<inputs.length;i++) {
| inputs[i].click();
| }
|
| // Are there more users?
| var moreBtn = document.querySelector('div._4t2a a.pam.uiBoxLightblue.uiMorePagerPrimary');
| if(moreBtn) {
| moreBtn.click();
|
| // Check if invite quota is exceeded, else continue
| var error = document.querySelector('div._t');
| if(error) return "I think too many likes!";
| // Else continue to invite people to like the page
| else return setTimeout(invitePeople, 5000);
| } else {
| return "Sucessfully finished!";
| }
| }
|
| invitePeople();