Automattic / Automattic/jetpack

Sharing: extend Mastodon button to cover more platforms

Open
#30,675 2 comments 5 reactions 0 assignees View on GitHub
[Feature] Sharing [Plugin] Jetpack [Pri] Normal Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### What

The Mastodon sharing button works well with Mastodon, but could be extended to support more Fediverse platforms

### How

This is something we had discussed when we first introduced the button in #28694.

Ideally, it would have been nice to implement a “Share to the Fediverse” button and not a “Share to Mastodon” button; that would have been useful to more people.

However, each Fediverse service is different, and each one comes with a different feature set.

- Some, like Mastodon, include a fully-fledged web interface. This is why it is possible to implement a “Share to Mastodon” button. Its interface includes a `/share` route that allows you to pre-fill a message input from.
- Others, like [GoToSocial](https://gotosocial.org/) (that’s the service I personally use) are mostly headless services; the only way to compose your toots is to use a third-party client.

That stops us from easily implementing a “Share to Fediverse” button, since there is no single common way to post something to the Fediverse right now. This may change in the future thanks to efforts like this one:
https://codeberg.org/fediverse/fediverse-ideas/issues/1

Until that happens, we have some options:

- We could introduce new Sharing buttons for the different services that have a share intent URL. We could for example introduce a new "Share to Calckey" button since Calckey supports `/share`, just like Mastodon. This of course could become noisy and confusing for some folks as the number of buttons would increase. We would also have to consider what platforms we want to support; should there be a "Share to Calckey" button as well as a "Share to Misskey" button?
- We could extend the existing "Share to Mastodon" button so it would be clear it could be used to share to other platforms too. I do not know how this should look like: should the different options be presented in the sharing modal, instead of the existing Mastodon modal:

image

If so, what should the initial button look like, and what should it say? Would a "Share to Fediverse" button be:

1. understandable for folks who may not know about the term "Fediverse" and would expect a Mastodon icon and name;
2. correct when in fact the button would only support a fraction of the Fediverse since there are so many Fediverse platforms out there that would not work with it.

********

Related discussions:

- [The case for native handling of Fediverse actions](https://jeremy.hu/the-case-for-native-handling-of-fediverse-actions/)
- [Common share intent URL on Calckey](https://calckey.social/notes/9ene4kumar)

Contributor guide

Open the contributing guide

Research direction

Start with the Mastodon sharing button and its sharing modal, then read the discussion in #28694 and compare the share-intent behavior described for Mastodon and Calckey. Before implementation, establish which platforms are supported and how the button should be labeled; done means the agreed platforms and wording work consistently in the sharing UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, react, wordpress
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.