How to like programmatically an instagram picture (javascript)

///How to like programmatically an instagram picture (javascript)

Javascript is so cool, you can automate anything.

In this example i will show you how to like a picture on Instagram with just 2 lines of javascript code.

var like = document.getElementsByClassName("_eszkz _l9yih");
like[0].click();

With javascript you can acces the HTML DOM (Document Object Model).

Finding the like element by the Class Name (press F12 in Chrome)

You can also find elements by :

Method Description
document.getElementById(id) Find an element by element id
document.getElementsByTagName(name) Find elements by tag name
document.getElementsByClassName(name) Find elements by class name

By |2018-05-05T21:57:00+00:00March 23rd, 2018|0 Comments

Leave A Comment