Closed 7studio closed 3 years ago
Related https://github.com/WordPress/gutenberg/issues/8361#issuecomment-409652402
I think there's some difference between how Facebook posts are embedded within the Classic Editor vs. Gutenberg, which makes them not work in Gutenberg.
Thank you for your answer Daniel :relaxed:
I'm not sure there is a difference between the Classic Editor and Gutenberg about Facebook oEmbed insertion. Plus, it is really stange that other services work and Facebook doesn't :confused:
I hope Facebook oEmbeds will work when Gutenberg will be inserted in WordPress core.
I took the time to look into core-blocks/embed
and the Sandbox
component and now I understand why Facebook contents can't be included. There are so many differences between Gutenberg and Classic editor. I'm sorry for my quick previous answer.
Can you explain to me why the embeds are sandboxed? They are not in the classic editor and in front-end.
I took the time to look into
core-blocks/embed
and theSandbox
component and now I understand why Facebook contents can't be included. There are so many differences between Gutenberg and Classic editor. I'm sorry for my quick previous answer.
No worries! Glad you were able to come to some understanding.
Can you explain to me why the embeds are sandboxed? They are not in the classic editor and in front-end.
I don't know off the top of my head, to be honest. It may be related to admin authentication cookies; the Classic Editor TinyMCE instance exists within an <iframe>
, and frontend rendering doesn't have access to /wp-admin/
cookies. I'm sure there's some rationale for it though.
Removing the REST API Interaction
label because this doesn't need any changes from the REST API.
Reported in #10653779-hc with follow up at #1913555-zen
@danielbachhuber Just to confirm, the preview is a no-no?
@renatonascalves I don't recall exactly. If I were to look into this again, I'd first see if it was possible to cleanly sandbox the embed within an <iframe>
(keeping in mind that it will need to resize responsively). If it doesn't look like it would be feasible, then I'd look at clarifying the error message (specifically for Facebook) to explain why the embed doesn't work within the editor.
This can be closed since facebook is no longer supported in the embed block because of their api changes. https://github.com/WordPress/gutenberg/commit/87c4dc536f52254975b4b5e192e36f7d98b6f0b7
Describe the bug When I try to use the Facebook Embed Block, the preview of a valid embeddable content is not displayed. Plus, when I try the same thing with the classic editor, it works very well.
Maybe this issue is relative to the #5530 one.
To Reproduce Steps to reproduce the behaviour:
Expected behaviour Gutenberg should display a preview of the embedable Facebook content or at least its HTML fallback. E.g.:
If for some security issues, you don't want to embed external scripts into Embeds Block Previews, you are able to add the
omitscript
parameter to the Facebook API endpoint: https://developers.facebook.com/docs/plugins/oembed-endpoints?locale=en_GB#parametersScreenshots
Additional note
/oembed/1.0/proxy
is valid;