Automattic / Automattic/jetpack
Sharing: Open Graph tags not added when using sharing buttons block instead of legacy sharing module
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Social
### Quick summary
Not sure if this is a bug or expected behaviour and just some text needs to be updated.
I am working on a FSE theme and want to add the share button blocks to my templates, which all works well :)
I enabled the JP sharing toggle in `wp-admin/admin.php?page=jetpack#/sharing` and the following message appears:
```
You are using a block-based theme. We recommend that you disable the legacy sharing feature above and add a sharing button block to your themes’s template instead
```
So I disabled the sharing toggle and just added the share buttons to my theme template, however I noticed that with the sharing toggle switched off, no og: tags appear in the html on any post or page.
If I switch the share toggle back on the og: tags appear as expected. I'm not sure if it is expected behaviour that when the share toggle is off, the og: tags should not appear in which case perhaps revise the error message as it is a bit confusing as is.
If og: tags should appear on FSE themes when the share toggle in off, they need to be added to the header...

### Steps to reproduce
1. Install a FSE theme & jetpack
2. Add share icons to the FSE theme templates or posts / pages
3. notice there are no og: meta tags in the html of any post or page
4. Enable the legacy sharing feature in `wp-admin/admin.php?page=jetpack#/sharing`
5. Notice the error message saying you should switch off legacy sharing on FSE themes
6. Go to any post or page and notice the og: meta tags are present in the html
### A clear and concise description of what you expected to happen.
og: meta tags should appear on FSE themes OR clearer instructions on how to get this to work on FSE themes
### What actually happened
_No response_
### Impact
All
### Available workarounds?
Yes, easy to implement
### If the above answer is "Yes...", outline the workaround.
- Activate this plugin: https://wordpress.org/plugins/always-use-jetpack-open-graph/ , or
- Enable the legacy share button
### Platform (Simple and/or Atomic)
_No response_
### Logs or notes
Using JP 13.8-beta
Contributor guide
Research direction
Reproduce the behavior using a block-based theme, share button blocks, and the sharing setting at wp-admin/admin.php?page=jetpack#/sharing. Trace how the sharing setting affects Open Graph tags in the page header, then confirm whether block-based sharing should provide those tags or whether the displayed guidance needs clarification; done means consistent tags or accurate instructions for the supported setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100