I'm trying to put a facebook 'like button' on each post of a blog. The code was pasted correctly, but i'm getting this error:
Refused to display 'https://www.facebook.com/undefined/plugins/like.php?action=recommend&app_id…%2F&layout=button_count&locale=pt_BR&sdk=joey&share=false&show_faces=false' in a frame because it set 'X-Frame-Options' to 'DENY'.
There is a 'undefined' after facebook.com/, and i don't know why.
Any idea how to solve this issue?
This is unfortunately a bug in how the JS SDK does implicit initialization (the init params in the url), so you're doing everything correct.
A fix is being prepared, but for now, you can use /en_US/all.js
instead of /en_US/sdk.js
.
Old topic but a new problem - see also the new comment from @gkpo
Sorry, I can't comment (low reputation) but I tried several things to resolve the Facebook 'Like Plugin' issue.
The Facebook like.php returns a DENY for X-Frame-Options.
So I tried to renew the script Facebook plugin like. -> Does not work.
I tried setting up X-frame options for my page (allow Facebook). -> Does not work.
Then I tried to link my page with Facebook business manager (there is an option to link pages with verification). I thought this is the solution because the like button was back, but the secret was my Facebook login.
The plugin does not return DENY if you are logged into Facebook.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With