Closed belcherj closed 2 years ago
This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.
Part of the Block Audit milestone: https://github.com/Automattic/wp-calypso/milestone/320 As discussed with @4thhubbard, leaving it for future consideration.
~Technical analysis: Embed links are converted into shortcodes, and shortcodes are not parsed in notifications. I believe this issue is similar to https://github.com/Automattic/wp-calypso/issues/45208#issuecomment-844067939.~
See further explanation https://github.com/Automattic/wp-calypso/issues/45208#issuecomment-845726940 and https://github.com/Automattic/wp-calypso/issues/45110#issuecomment-870716353.
Though it feels like a duplicate, I'm keeping this issue open so we also test specifically Facebook embeds.
Hello @belcherj ! 👋 Could you give us the steps how to use Facebook embeds block in the comment? I was not able to use the block editor in comments so I manually put code like the following.
<!-- wp:embed {"url":"https:\/\/www.facebook.com\/WordPress\/posts\/10159255205527911","type":"rich","providerNameSlug":"facebook","responsive":true,"previewable":false} -->
<figure class="wp-block-embed is-type-rich is-provider-facebook wp-block-embed-facebook"><div class="wp-block-embed__wrapper">
https://www.facebook.com/WordPress/posts/10159255205527911
</div></figure>
<!-- /wp:embed -->
Did I do it correctly? :)
If my understanding is correct (well, I'm known for misdiagnosis anyway so take things with a grain of salt), the facebook url itself acts as a shortcode.
What shortcodes/facebook.php does is that it creates a div container out of these links.
And a FB script is injected during the page load, where this FB script will scan the page for these div containers, and replace them with the FB content (photos/videos/etc.).
~So this might post another challenge because this phab patch D61784-code would only insert the container without loading the FB script (since notification bodies are sent through REST API, I don't think wp_enqueue_script
calls would work).~
UPDATE: I striked out the above paragraph as this was about Reader not Notifications. As for Reader, similarly, if contents were stripped and loaded via REST API, perhaps what's missing is the injection of FB script for these FB containers to transform into actual FB content.
Gonna close this one for now. Happy to re-open if additional customers report it or if someone wants to work on it.
Steps to reproduce
What I expected
Facebook Embed block in comments should appear
What happened instead
Facebook Embed block does not appear
Browser / OS version
Chrome/OSX Latest
Context / Source
manual-testing