Follow

Does anybody know what OpenGraph tags Mastodon uses for linking "cards"? I have OG tags set on my site, including og:url for specific blog and art posts, but the cards always link to my site, not the post.

/cc @feditips @ramsey

@kboyd @ramsey @mwop I'm not familiar with the Mastodon source code, but this looks to me as if og:urls are only matched when they start with http, not https 🤔

@mwop @jerome @ramsey maybe - but to me, this looks like a test, not the actual code doing the work. It could be that http is the only one that is tested.

@mwop I can’t find any documentation specific to Open Graph, but there is an API request that represents a card: docs.joinmastodon.org/entities

@Gargron, can you point us in the right direction?

@ramsey @Gargron I *think* I may have found it. The OG parser looks first for a canonical link, THEN an og:url. I had both, but my canonical was pointing to the site vs the specific page. Thus my cards were linking to the site instead.

Will be testing shortly...

Sign in to participate in the conversation
PHP Community on Mastodon

Open source. Open community. We are dedicated to building and enriching the PHP community.