• Campus Karma



Invite All Your Facebook Friends to Like a Page or Event on Facebook Using Script [Updated - Nov 2017]

Note: July 14, 2015 - We have depreciated this article due to the recent change in facebook Invite process. Script and tutorial in this article won't work with the new facebook invite process. Request you to kindly visit Invite Your Facebook Friends to Like Page - July 2015 for the updated tutorial with the new script.
Update: September 25, 2015 - You can continue using this script as facebook has rolled back its facebook invite process to the old one.  
Update:November 11, 2017 - Facebook has apply limit on the facebook invitation and you would get temporarily ban for sending the invite in one go. The script has been updated and now you can send the invite in one go without any ban. See below for details.

1)  Go to your page (Example: www.facebook.com/campuskarma)



2)  On the facebook page, Click on the "Invite friends to like the page" link.



3)  A popup will appear. Click on the popup screen and press “Space Bar” till the list reaches the end. 



4)  Open the browser's console to run the script
a) Google Chrome: Press Ctrt+Shift+J and paste the below script and press enter.
b) Mozilla Firefox : Press Shift+F4 and paste the below script and select “Execute” > “Run” (Ctrl+R).


javascript:var inputs = document.getElementsByClassName('uiButton _1sm'); for(var i=0; i<inputs.length;i++) { inputs[i].click(); } alert("Invite Sent to "+inputs.length+" Friends");

Update: Facebook has updated it's security as on Oct 2017 and has limit Invite Request. This below script will send 50 invites and sleep for 10 seconds. After 10 seconds it again sends the next 50 invite and the process goes on until all your friends are invited. This process is time consuming but it will ensure that all your friends are invited with one run of the script and you don't get ban for exceeding the invite sending limit.

javascript:var inputs = document.getElementsByClassName('uiButton _1sm'); function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms));} async function fb_invite() {for(var i=0; i<inputs.length;i++) { inputs[i].click(); if(i==49){ await sleep(10000); }} alert("Invite Sent to "+(parseFloat(i)+parseFloat(1))+" Friends");} fb_invite();

 5)  Final Screen will look like this. (Example: Chrome)