NO BUG: Facebook page element doesn't work

Bricks Version: 1.6.2
Browser: Any
OS: macOS
URL: localhost

Added the Facebook page element to a page and set the Facebook URL. Leave everything else as is.
Nothing displays in the canvas, preview or on the front-end.

When you add the facebook page element into a container, nothing is displayed on the canvas to show it exists (you can see it in the structure panel though). I was expecting something like ‘No facebook page selected’.

Because there is no documentation for this element concerning anything I might have to do in Facebook, am assuming this is a bug.

Working for me, it’ll likely be something specific to your page. Other plugins, JS errors or similar.

Thanks for taking a look. Tried the Facebook url and still nothing but get this as an error:

Refused to display ‘Log in to Facebook’ in a frame because it set ‘X-Frame-Options’ to ‘DENY’.

This is on the Bricks trial site so am assuming their server config is set like this.

David
Do you have a Facebook API code set in your Bricks settings? Reading up on this, Facebook does not allow itself to be displayed in an iframe as it sends an X-Frame-Option of Deny in its header. I saw this API field in Bricks and assume that if there is a code, then it bypasses the DENY.
Thanks

Hi Simon,
Thanks so much for your report!

Unfortunately, I cannot reproduce the issue. The Facebook API key isn’t needed to show a Facebook Page, but the page itself needs to be public/accessible.

https://facebook.com/audi
https://facebook.com/volkswagen
https://facebook.com/kia
https://facebook.com/porsche

Best regards,
timmse

Hi Stefan,

Then I am doing something very wrong as it just doesn’t work for me on my trial site:

You can see that I am using the audi url you used but there is nothing in the builder. On the frontend I am getting the javascript error again:

Refused to display ‘Log in to Facebook’ in a frame because it set ‘X-Frame-Options’ to ‘DENY’.

I’d like to take a look, but since it’s a local installation, it’s difficult. Can you reproduce the problem in a new installation (preferably on a server)?

It’s on your trial server. I’ll email across the details for you.

Hey Simon,
Thanks so much for the login credentials!

The problem seems to be a local one. I have no errors in the console and see everything as it should be:

Does this really occur with every browser without exception? Even in an Incognito tab? Alternatively, have you deactivated all extensions or change computers?

OK, it was due to ad/tracker/cookie blocking in some browsers. Disabling that, I now get the correct Facebook page frame display (as in your image above) in Brave, Firefox, Chrome, Opera and Vivaldi. Safari refuses flat because of Facebook setting X-Frame-Options to DENY even when all privacy stuff is disabled in the browser. Looking into this, it seems that Safari still prioritises X-Frame-Options over Content-Security-Policy definitions and unless you can change the option on the server there is nothing you can do.

When I then click on the brand name in a frame, the Facebook page opens correctly except in Firefox which replaces the frame contents with ‘Firefox can’t open this’. This is due again to the DENY setting. I then have to right click in the frame and select ‘This Frame > Show Only this Frame’ and then the Facebook page opens.

I certainly won’t be using the Facebook page element due to dubious browser behaviour!

Thanks for your help.

1 Like