Skip to content

Instantly share code, notes, and snippets.

@leotm
Created August 17, 2015 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leotm/e55371b97e8eded5d186 to your computer and use it in GitHub Desktop.
Save leotm/e55371b97e8eded5d186 to your computer and use it in GitHub Desktop.
Instagram - Friend or Follow - Bulk Unfollow/Follow
// So I wrote this purely to reverse getting hacked
// Resulting in following an extra 800 random people
// Always de-activate third-party tools after API authorisation!
// Enter into your browser console
var items = document.querySelectorAll("#content > div > img");
for (var i = 0; i < items.length; i++) {
// Simulates mouse hover over user images to open tooltips
// (Prevously tried amending the results classes and attributes)
$(items[i]).mouseenter();
}
// Wait several minutes until all user tooltips opened
// Once complete, this should equal number of user thumbnails you see in the grid gallery
document.querySelectorAll(".button-unfollow").length;
// To follow, change selector to ".button-follow"
var buttons = document.querySelectorAll(".button-unfollow");
for (var i = 0; i < buttons.length; i++) {
// Simulates Unfollow button click on all users
buttons[i].click();
}
// Now you should see your number of unfollowers/followers updating live
@muhammedfurkan
Copy link

doesnt wotk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment