How to like Instagram posts with JavaScript?

ye Aaram ka Mamala hai !

Featured image

Before starting let’s recall what JavaScript is and How it works ?

JavaScript is a scripting or programming language that allows us to implement complex features on web pages.

JavaScript is a scripting language that enables us to create dynamically updating content,control multimedia,animate images and pretty much everything else.

JavaScript is both client side and server side language. Like node.js could be used on server side and vanilla Js for client side .

In this process we’ll use JavaScript Client side behaviour to execute our script in browser .

This script will use execute itself in client side browser and automatically like the instagram posts.

Prerequisite

Steps :-

code

let likesGiven = 0;
setInterval(() => {
    	let heart = document.querySelector('button.wpO6b'),
            arrow = document.querySelector('.coreSpriteRightPaginationArrow');
        if (heart) {
            likesGiven++;
        heart.click();
        }
        arrow.click();
	console.log(`You've liked ${likesGiven} post(s)!`);
}, 2000);

Sample Video