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.
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);