3 March 2026 2min read

Using the Official Mastodon Share Button

Today Mastodon has officially released their solution for a Share to Mastodon button. I was already using a third party service on this site, but I decided to give it a try because using officially supported tools seems easier to maintain in the future, especially for something I don’t work on every day.

The reason something like this must exist is due to the beauty and the problem with Mastodon. It is not a single website. There are thousands of servers. A share button can’t just link to mastodon.social and call it a day, because the user’s account might be in another server. So a redirect tool that lets you pick your instance must exist. That used to be a third-party problem to solve. Not anymore.

Mastodon now hosts share.joinmastodon.org. Open source, no tracking, runs entirely in the browser, remembers your accounts.

On the code side, this was a one-liner. The old URL:

https://mastodonshare.com/?text=<title>&url=<url>&via=alexito4

The new one:

https://share.joinmastodon.org/?text=<title> <url>

The official service takes a single text parameter with the content you want to pre-fill. Title and URL combined. That’s it.

Why It Matters

Using a third-party share button means you’re depending on someone else’s uptime, their privacy policy, and their continued interest in maintaining the thing. The via parameter I was passing didn’t even make sense for Mastodon the way it does on Twitter. It was just cargo-culted from the Twitter share URL pattern. And honestly, every time I used it myself, even on Twitter, I end up removing the “via…” anyway.

The official tool is the right call. It does less, and that’s a good thing.

If you have a “Share on Mastodon” button on your site using an old third-party service, now is a good time to swap it out. And don’t hesitate to try it with this post, the button is just down below.

If you enjoyed this post

Continue reading