Hi, thanks for quick response!
First off. I’m not a huge techie in this regard. I’ve added the Facebook SDK in my webpage header, and added a button in my content.php (part of my template). According to the example that I added in the first link above. I deviated from the example by chaning the href to window.location.href
to call the actual page URL.
When I installed autoptimize, the share button stopped working. I’ve tried turning off each of the Autoptimize options to see what caused it. Turns out that only turning off HTML optimization made it appear again. Leaving CSS and JS on does not create problems.
What should it do?
It should open the facebook OpenGraph dialog to share the current page. Current behavior is that it loads the dialog in a new tab.
What does it do instead?
When HTML optimization is turned on: the button activates, but does not load anything.
I do not know what specifically cause the breaking. But I suspect its the facebook scripts paired with the button in the content.php which generates the html.