Mastodon Posts ("toots")
Posts are straightforward to embed (Mastodon's API supports
oEmbed, and
it has an embed code option on the default web UI), timelines
need a bit more work.
-
A single post using the default embed option from Mastodon -
example
-
A single unformatted post (JSON data) pulled from the Mastodon API -
example
Mastodon Timelines
There is no built-in support for embedding a timeline directly from
Mastodon, so some work with the API is required. Good opportunity to
learn the API, and to build something new! ๐ ๏ธ
One additional useful thing to know is that Mastodon timelines also have
RSS feeds as standard:
[instance]/users/[username].rss
-
for the sake of example, mine is
https://macaw.social/users/andypiper.rss
- this means that you can plug this in to any widget that styles an RSS
feed on a site, for example (although it might not look quite the same
as a "proper" timeline on a Mastodon page), or, you can build a
component to use the data from there and style it as you prefer. Handy
info!
Image posts (Pixelfed)
The
Pixelfed API
is similar to Mastodon v1; it does not offer an oEmbed endpoint (that I
have found).
-
A single post using the default embed option from Pixelfed -
example
Pixelfed has Atom feeds for user timelines (not RSS) - they are at
[instance]/users/[username].atom
Learn more and read the code that does this by boopsing on the fishies
below! โคต๏ธ or, look at
the GitHub project
(the same code, but needs to be deployed to a web server).
If you want to say hello ๐๐ป I live in the #Fediverse at: