Facebook Like and Share Buttons
So, in 2023, there are two methods, Javascript SDK method and iFrame:
https://developers.facebook.com/docs...ns/like-button
I'm trying to display Like and Share buttons and having a very frustrating experience.
I've concluded that for the buttons to display
- the user needs to have accepted the Facebook essential cookies
- the user needs to be logged into Facebook
- tracking settings in the browser may need to adjusted
And being in europe may also influence it (GDPR) but I find no specific setting to deal with that...I assume it is in the initial cookie acceptance.
PITA#1
I find that with two facebook accounts, logged in from the same browser/pc/country: buttons are displayed for one user but not the other.
Maybe that's related to the previous point, but I can't find anything.
Flaky.
PITA#2, when Like and Share buttons are actually displayed.
- SHARE works correctly opening a dialogue box with image...yesterday. Today it loaded no images, until the evening, with no code changes in-between. More flaky.
- LIKE. When clicked, I get a broken image and a console error of
crome-error://chromewebdata/:1 Refused to display 'https://www.facebook.com/' in a frame because it set 'X-Frame-Options' to 'deny'.
in Chrome and Firefox. After a day on Stackoverflow and YouTube, I can't find anything that solves this.
Results are the same with both methods, local or on hosting, with or without an appID, in Zen Cart or on a blank page, using urls of the source page or of the facebook page.
Some idle hands here may go looking for a solution. Don't. Been there, done that.
This is only a last-resort post in case anyone has had this problem and solved it/also given up.