Zum Inhalt der Seite gehen


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.

#FediTips #Mastodon
Dieser Beitrag wurde bearbeitet. (3 Wochen her)
Is there a way to embed a hashtag?

For instance if I follow "#Owncast" can I then embed that feed?
You could do this by embedding the RSS feed of a hashtag on a particular server.

This would require your website or blog platform to have some kind of RSS embedding capability, or else you would have to add such a thing with an add-on or script.

About feed addresses, the RSS feed of #OwnCast on your server would be https://mastodon.social/tags/owncast.rss
I don't get any HTML code.

Web, Mastodon version v4.4.0-nightly.2025-03-14-security

Your server mastodon.social runs experimental code, looks like it might have broken this feature... 😦

I will report this on the Github so they can fix it.
wahrscheinlich ist diese Funktion in dem neuesten Update der Mastodon Server Software eingeschränkt worden.
This feature seems to be broken on mastodon.social as it runs the experimental version of Mastodon's software. I will report this as a bug.
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 🙏
Dieser Beitrag wurde bearbeitet. (3 Wochen her)
It doesn't seem to have anything to do with nightly. It works on some posts and not on others.
I cannot get it to work on any posts on mastodon.social, they all have the same error.

However, it does work on all posts on my own instance which is running release.
Dieser Beitrag wurde bearbeitet. (3 Wochen her)
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.
Dieser Beitrag wurde bearbeitet. (3 Wochen her)
This is a reasonable point but a separate issue, someone has already raised this at https://github.com/mastodon/mastodon/issues/4883
Is there a way to always show the newest post on my website? Probably not going to do it, but still interested.
Yes, if your website or blog has the ability to embed RSS feeds. The feed address of an account is its website address plus .rss on the end of the URL.
I find this problematic: Today I embed a Toot in my website, tomorrow the content of the Toot is changed and my website shows something totally unrelated, or even contradicting.

In order to embed a Toot, I need a hardlink to a version which does not change anymore. Otherwise it's a screenshot for me, and a link to the Toot.
If you also boost the toot from your Mastodon account when you embed it on your site, you will be notified in Mastodon if the toot changes.
Dieser Beitrag wurde bearbeitet. (3 Wochen her)
This is a workaround, yes. I don't necessarily want to boost every Toot I include in a blog posting though, especially when the content is negative.

There have been enough news postings about embedded Tweets which later got edited and showed something completely different.
Appreciate the problem, just not sure how else it could be done 😦

If you allow editing and embedding, then there will always need to be some kind of account involved to notify you about updates to the post.

(It's sort of similar to posting links on the web in general, the site you link to may change after you publish the link.)
Dieser Beitrag wurde bearbeitet. (3 Wochen her)
the difference being if I add a link, it's just that, a link. If I embed a Toot, the content becomes part of my website.

This was abused in the past, once Twitter allowed editing Tweets. One must be aware of that.
It's a fair point, it is indeed important to be aware of the risk. I added a section to the guide as a result of your reply.
Dieser Beitrag wurde bearbeitet. (3 Wochen her)
Thank you. I did not know this was possible. You could embed a post to the article as an example 😎
what is the advantage of doing that instead of a screen shot of the post? I guess SEO but anything else.
@donbarthel

There used to be the advantage of making the embedded post more interactive and accessible. Unfortunately it looks like they have removed these features 😞

Together with the unreported bug, wish I'd picked a different tip to feature today 😦

Oh well, tomorrow is a new day...