Mastodon: Intent/share URLs

Created on 8 Jan 2017  路  14Comments  路  Source: tootsuite/mastodon

A really good simple step for letting third-party apps/sites/etc share to Mastodon would be implementing an Intent URL (e.g. https://dev.twitter.com/web/intents ).

At the simplest, I can imagine just opening the /web of the mastodon instance, with a parameter that pre-fills the toot text?

Most helpful comment

Please make this compatible to GNU Social which is using links like this: https://quitter.no/notice/new?status_textarea=This+is+where+the+text+belongs

Otherwise, already existing GNU Social share buttons (like on fsfe.org) won't work and we would have to create extra Mastodon buttons - which would segregate the communities.

All 14 comments

This isn't that easy - say there's a blog that has a "toot this" social media button. How does the button know what the clicker's home instance is?

There's some complications about how people get to the right URL, but having it so that an instance has a path/UI just for tooting, with parameters specified in query, would be a good first step. I'm working on a browser extension for "toot this" buttons, which has settings for the user and instances

Maybe at first a way to share in a defined instance? (ex: https://instance/api/v1/share?title=Hi)

That would be a good first step. A "toot this" button could always ask for the clicker's full handle including instance.

Just as an idea: Diaspora has a "bookmarklet" feature (at https://pod/bookmarklet?url=example.org) that works as an intent URL and some external services let the user choose their instance (e.g. sharetodiaspora -- example share link). If Mastodon implemented intent URLs it would be really easy to build a 3rd party service of this kind.

Please make this compatible to GNU Social which is using links like this: https://quitter.no/notice/new?status_textarea=This+is+where+the+text+belongs

Otherwise, already existing GNU Social share buttons (like on fsfe.org) won't work and we would have to create extra Mastodon buttons - which would segregate the communities.

The current uri for a new status is /web/statuses/new so a good solution could be to implement /web/statuses/new?status_textarea=Test+message

Example: Share to mastodon.social

The current uri for a new status is /web/statuses/new so a good solution could be to implement /web/statuses/new?status_textarea=Test+message

This again would make it necessary for websites to have separate buttons for GNU Social and Mastodon. IMHO this would weaken both networks in their public representation.

If you want to use /statuses/new, please make a redirect from /notice/new at least.

Is it safe to assume that bookmarklets are not (yet) possible?

You also have this on Firefox. The Firefox Social API: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Social_API

It is implemented in Hubzilla as a plugin. You find the code (PHP, so it's for inspiration) here: https://github.com/redmatrix/hubzilla-addons/blob/master/firefox/firefox.php

(copying my post from #1978)

Really really low priority. But I think it is a nice feature to have.

Social media sites like Twitter, Facebook provides websites with Social Plugins. Website owners can include a piece of JS / HTML embed to display a "Share to XXX" button. Visitors can share the website's like and perhaps part of the content to that social media site.

Examples,

Propose to:

  1. Write and host a "Share to Mastodon" script.
  2. By embeding, website owner can display the "Share to Mastodon" or "Toot it" button on the site.
  3. Visitor, when first use on the button in any site,

    1. Visitor will get a dialog to input the instance URL to share.

    2. Then a dialog to actually edit the post content for sharing.

    3. The dialog should have a "Toot" button to actually toot on the site.

    4. Should the visitor not login to the site, it should direct the user to additional login process.

  4. The instance specified will be stored in cookie (of the script's CDN domain).
  5. Later on, if a visitor use the button on any site with again,

    1. Visitor will get a dialog to actually edit the post content for sharing.

    2. This dialog also show that it will Toot to "Preferred instance", which the script memorized with cookie earlier. Visitor should have an option to specify another instance.

    3. Other behavior should be the same as the first use.


  • [x] I searched or browsed the repo鈥檚 other issues to ensure this is not a duplicate.
  • [ ] This bug happens on a tagged release and not on master (If you're a user, don't worry about this).

should we consolidate this into https://github.com/tootsuite/mastodon/issues/2291? It provides a much more feasible technical implementation of this idea, in my opinion.

FYI:

The intent of Pawoo looks promising, but #2291 requires an intent to be usable for _any_ instance. For example, such a share button should be used with both of mastodon.social and pawoo.net. I have written two specifications and made a prototype for the purpose.

Specifications:
Intent Class In Activity Streams 2.0 Vocabulary
https://akihikodaki.github.io/activity-vocabulary-intent
URL Scheme for Activity Streams 2.0 (use with registerProtocolHandler)
https://akihikodaki.github.io/activity-vocabulary-intent/scheme

Prototype: https://github.com/tootsuite/mastodon/issues/2291#issuecomment-313302597

EDIT: I added the _ActivityPub Extension for Intent_.
https://akihikodaki.github.io/activity-vocabulary-intent/activitypub

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kaniini picture kaniini  路  70Comments

Laurelai picture Laurelai  路  57Comments

lunar-debian picture lunar-debian  路  58Comments

strugee picture strugee  路  76Comments

SelfsameSynonym picture SelfsameSynonym  路  96Comments