Blog

Instagram auto like account’s posts script

Instagram auto like script is a way to easy growth hack your Instagram portfolio.

Thanks Ellen for requesting this in the comments.

How to use the script:

  1. Go to the Instagram page of the account
  2. Open one post
  3. Open the Console pressing Ctrl + Shift + J (Windows / Linux) or Cmd + Opt + J (Mac) 
  4. Copy the code below and paste it into the Console tab 
  5. Press Enter and wait
// Updated: 2019-06-20
 // This script is made for demonstrative purposes only. 
 // Use at your own risk. 
 // Respect the Instagram's policy and terms of use.
 function loop() {
   console.log('Script loading…please wait…');
   // Get a random number between 1-10 and add 3, to get one between 4-13:
   var Time1 = Math.ceil(Math.random() * 10) + 3;
   var Time2 = Math.ceil(Math.random() * 10) + 3;
   setTimeout(function() {
   // Do a Like action
   if ( document.querySelectorAll('span[aria-label="Unlike"]')[0]) {
       console.log('Skipping…');
   } else {
       console.log('Like the post…');
         var btn = document.querySelectorAll('span[aria-label="Like"]');
         btn[0].click();
   } 
   setTimeout(function() {
   // Go to the next picture if exists
   if (document.querySelectorAll('a.coreSpriteRightPaginationArrow').length) {
           console.log('Loading next post…');
             var btn = document.querySelectorAll('a.coreSpriteRightPaginationArrow');
             btn[0].click();       
   } else {
           // If not… 
           // ..nothing. Page can't be reloaded. Do it manually and run the script again.
           console.log('Reload the page and run the script again.!');
   }
   loop();    
   }, Time1 * 1000);
   }, Time2 * 1000);
   }
   loop(); 

Did you like this? Share it!

4 comments on “Instagram auto like account’s posts script

Your script for auto follows is not working. 🙁

Are you sure, because I just checked it and all was OK.

Btw, this is not for auto follow, it’s for liking all posts of the specific acc.

There is an error “Uncaught TypeError: Cannot read property ‘click’ of undefined” on line 17 “btn[0].click();”. Thank you!

Hi, it should work fine. You need to go the the page and open one post so it can do the work.

Leave Comment