When using the Post Inspector tool on LinkedIn to see how pages would look when shared, I noticed that the data being pulled for each page and post was coming from WP Core's discovery links (https://developer.wordpress.org/reference/functions/wp_oembed_add_discovery_links/). The data was not coming from the oEmbed data that Yoast SEO plugin was adding to the page. As such, fields like page title did not include site name, separators, and so on, but instead, only included the internal page title used in the Wordpress editor. The oEmbed data generated by Yoast seems to be completely ignored by LinkedIn, defaulting back to WP Core's oEmbed data.
LinkedIn was correctly grabbing the Open Graph data, but since LinkedIn prioritizes oEmbed data, it was using the oEmbed data from WP Core as the value. To get around this, I disabled the discovery links from being added by Wordpress so LinkedIn falls back to Open Graph tags.
I expected the oEmbed data generated by Yoast to override the WP Core oEmbed data, reflecting things like titles and descriptions that have been tailored to the page using the Yoast SEO plugin. Instead, I had to disable WP Core from adding the default oEmbed data via the <link /> element, forcing LinkedIn to fallback to Open Graph data.
remove_action( 'wp_head', 'wp_oembed_add_discovery_links');


* If relevant, which editor is affected (or editors):
- [x] Classic Editor
- [x] Gutenberg
- [x] Classic Editor plugin
* Which browser is affected (or browsers):
- [x] Chrome
- [x] Firefox
- [x] Safari
@jono-alderson were you able to create a feature request regarding this LinkedIn bug?
Not yet. On my to-do list. Needs some investigation.
Alright!
I propose that we should alter the oembed properties (at /wp-json/oembed/1.0/embed) to match the contents of the metadata on the page. Specifically. we should:
title property to match the og:title.description property which matches the og:description.
Most helpful comment
Fixed in https://github.com/Yoast/wordpress-seo/pull/14784