0

I am using the Facebook "Like Button for the Web" tool to generate a like button on my WordPress web page. The generated code inserts the like button but when I click the button, I am getting an error in the console:

Refused to display 'https://www.facebook.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

Generated IFrame code

<iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.perofamilyfarms.com%2Fpepperday%2F&width=72&layout=button&action=like&size=large&share=false&height=65&appId" width="72" height="65" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>

This worked previously but I haven't checked it in a while.

3
  • src="...&height=65&appId" - I don't think the appId parameter should be empty. I am not sure if Facebook added any restrictions regarding like buttons recently, but it could be that they limit this to use on the domains configured in the app settings now. Try to remove the empty parameter, and if that does not help, add an actual app id, of an app that has the site you are using this on configured in app domains and website platform.
    – CBroe
    Commented Apr 28, 2023 at 6:10
  • Thanks for your reply but removing the appID parameter had no effect. This is not an app that I have created though this is the Facebook button generator.
    – Junky
    Commented Apr 28, 2023 at 13:06
  • Yes, but the button generator automatically forces me to select one of my apps, when I try to create one. Probably different for users that don't have any apps. Not sure what else could be wrong here then, sorry.
    – CBroe
    Commented Apr 28, 2023 at 13:15

0

Browse other questions tagged or ask your own question.