Instagram likes

I’m new (and not overly savvy at web programming) so please forgive me if I’m asking a basic question.

I want to be able to “like” Instagram photos that my clients post each day and I want it to happen automatically. The problem I’m running into is the double-click needed to like a photo. I can’t single click on the heart because if the newest post was liked previously and this will unlike the photo. Double-clicking does not toggle the like status.

Any help would be most appreciated.

Gavin

You must try to detect active like and with an if click only if is not active.

It’s not a simple work to do, need to study

2 Likes

Try executeScript and dispatching an event.

In the “target” field put something like this:

var xpath = "//article/div[2]/div/div/div[2]"; var e = document.evaluate(xpath, document, null, XPathResult.ANY_TYPE, null).iterateNext(); var event = document.createEvent('MouseEvents');  event.initEvent('dblclick', true, false); e.dispatchEvent(event);

Adapted from this stackoverflow answer

Yes, You are right. I totally agree with you. Study on this topic is necessary.