Hi everyone, I apologize for my "bad" English (thanks chat gpt), but I'll do my best to explain my issue.
I'm referring to the documentation provided by Facebook at https://developers.facebook.com/docs/plugins/like-button/.
In my application code:
window.fbAsyncInit = function() {
FB.init({
appId: 'my id here',
xfbml: true,
version: 'v19.0'
});
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement(s);
js.id = id;
js.src = "https://connect.facebook.net/pt_BR/sdk.js";
js.crossOrigin = "anonymous"
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
Plus, I've included the div with id="fb-root" and the div for the button.
The error I'm encountering is "The loading of “https://www.facebook.com/plugins/like/connect” in a frame is denied by “X-Frame-Options“ directive set to “deny“," as shown in the console, even though it shouldn't."
Am I making a mistake somewhere?
Hi! Have you managed to solve the problem since then?
The answer is here I believe.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options