Ever wanted to follow or unfollow people on LinkedIn aggressively without the hassle of clicking individual follow/unfollow buttons? Below are the codes you can use to mass follow or mass unfollow people on LinkedIn. But remember to use these LinkedIn follow/unfollow scripts for your own personal use/testing and respect LinkedIn rights.
LinkedIn mass follow script
To run LinkedIn mass follow script you have to use Chrome browser.
- Open LinkedIn and login to your account.
- Open an appropriate page of LinkedIn with a list of people to follow, like the search results page.
- Scroll down few times to load more profiles to the list.
- Press SHIFT + CTRL + I (Windows) or CMD + OPT + I (Mac) on your keyboard or right click anywhere on the browser and select “Inspect Element” or click on Chrome menu icon at the top-right corner of your browser window and then go to More tools > Developer Tools.
- Select the “Console” tab.
- Copy and paste the code below to console and press “Enter”.
const buttons = Array.from(document.querySelectorAll("button"));
const limit = 1000;
let count = 0;
buttons.forEach(button => {
if (button.innerText == "Follow" && count < limit) {
button.click();
count++;
}
});
LinkedIn mass unfollow script
To run LinkedIn mass unfollow script you have to use Chrome browser.
- Open LinkedIn and login to your account.
- Go to Following and you’ll see the list of people who you’re following.
- Scroll down few times to load more profiles to the list.
- Press SHIFT + CTRL + I (Windows) or CMD + OPT + I (Mac) on your keyboard or right click anywhere on the browser and select “Inspect Element” or click on Chrome menu icon at the top-right corner of your browser window and then go to More tools > Developer Tools.
- Select the “Console” tab.
1. Soft unfollow
With this script, you will unfollow only the connections that are visible on your screen. Copy and paste the code below to console and press “Enter”.
const buttons = [...document.querySelectorAll('button.is-following')]; for (let i=0; i < buttons.length; i++) setTimeout(() => buttons[i].click(), i * 1000)
2. Hard unfollow
With this script, you will unfollow all your connections. Copy and paste the code below to console and press “Enter”.
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
for (let button of buttons) {
count = count + 1;
const name = button.parentElement.querySelector(
'.follows-recommendation-card__name',
).innerText;
console.log(`Unfollow #${count}:`, name);
window.scrollTo(0, button.offsetTop - 260);
button.click();
await new Promise((resolve) => setTimeout(resolve, 100));
}
}
async function run() {
await unfollowAll();
window.scrollTo(0, document.body.scrollHeight);
await new Promise((resolve) => setTimeout(resolve, 1000));
const buttons = getAllButtons();
if (buttons.length) run();
}
run();
})();
Amazing
Hey there I am so delighted I found your weblog, I really found you by accident, while I was researching on Yahoo for something else, Nonetheless I am here now and would just like to say thanks a lot for a incredible post and a all round exciting blog (I also love the theme/design), I don’t have time to browse it all at the moment but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read more, Please do keep up the awesome work.
You need to participate in a contest for top-of-the-line blogs on the web. I’ll recommend this site!
Thank you.
Victor, the way you explain each step of the process is really useful. Your comments like “don’t worry if it freezes, give it a moment’ or ‘refresh and do it again’ make it more real than just reading an instruction and copying a line of code. Thank you.
Thank you for the kind words Tracey. Duly appreciated.
Hi, This script is not working. Could you help.