Re: Suggestions for a "View on fediverse" button in a HTML page

Fun! Sounds like a more sophisticated, fediverse-aware version of
rel=syndication <https://microformats.org/wiki/rel-syndication> /
u-syndication <https://indieweb.org/u-syndication> / rel=alternate links.
(Most fediverse servers already support a related UX flow: if your blog
post includes a rel=alternate link to a fediverse post
<https://fed.brid.gy/docs#searchable>, you can search for your blog post's
URL in a fediverse server and it will return the native fediverse post.)

The classic problem, as you mention in #2, is that due to browser
same-origin policy and cookie isolation, afaik there's no way for a given
web page to determine where you're currently logged into a fediverse
account. That also applies to #1, right? If someone's logged into Mastodon
somewhere, and they click this button on your blog, you still won't know
where their Mastodon server is.

This is an age-old UX problem in the fediverse. Fediverse servers
themselves generally all do #2. If you open a post on a server you're not
logged into, and you click the like or reply or post button, it won't know
where to send you. It has to ask you for your server.

(Browser extensions and other native tools can solve this better, of
course! But those are whole other cans of worms.)


On Mon, Apr 22, 2024 at 4:01 AM Cristiano Longo <
cristianolongo@opendatahacklab.org> wrote:

> Hi all, I developed a small blogging platform which, among blogging
> features, publish posts on the fediverse as Notes. I wonder add a "View
> on fediverse" button in the post page. However, the user which press
> this button should be able to add coments, like and share the Note
> object. Let me enumerate two possible use cases:
>
> 1) the user is logged in (via web interface) to her mastodon account on
> some server. In this case the "View on the fadiverse" button open the
> server web page showing the Note object, but with the user already
> logged in;
>
> 2) the user is not logged in to any activity pub server, but her holds
> an account on some such a server which provides a web interface. In this
> case, the user should be asked for server IRI and her account
> credentials. If authentication succeeds, the rest works as in 1).
>
> Sorry for the confused request, any suggesiton is welcome.
>
> CL
>
>
>

-- 
https://snarfed.org/

Received on Monday, 22 April 2024 14:11:12 UTC