You can embed Mastodon posts in your website or blog by doing the following:
1. Log in through your server's website
2. Go to the post or reply you want to embed and click on it to show it in an enlarged view
3. Click ⋯ on the post and select "Get Embed Code"
4. Copy-paste the HTML code into your website or blog
Lots of common questions answered about this at:
https://fedi.tips/how-to-embed-mastodon-posts-on-a-website
If you have problems embedding, see the article for suggestions.
p.s. UPDATED: It seems that there are bugs on this feature when trying to embed some posts that are on other servers.
I've reported this as a bug including examples of it happening, the report is at https://github.com/mastodon/mastodon/issues/34181
I'd mistakenly thought it was just mastodon.social with the problem, thanks to @Stefan_S_from_H for correcting me
@FediTips It doesn't seem to have anything to do with nightly. It works on some posts and not on others.
@FediTips it uses the OEmbedSerializer class for the actual code.
It gets called here: https://github.com/mastodon/mastodon/blob/2f98134ac69ee840095c9d8389e4b2fff72f20c1/app/controllers/api/web/embeds_controller.rb#L12
There seems to be a problem with fetching it when it's not local.
But I'm no Rails or Mastodon guy. I give up at this point.
Oooh... weird. Thanks for that. Odd that it seems to be buggy so much more often on mastodon.social?
I was picking lots of random posts and trying it, every post caused problems on m.s and not on release, so I assumed it was nightly...
EDIT: I've updated the issue with examples of where it happens.