I want to build a very simple blog that can federate with Mastodon. To get started I just want to make it so that people could search for my profile, and see the list of posts.
What are the absolute minimal requirements necessary for Mastodon to be able to fetch my profile and a list of posts from my blog?
I just want to hardcode and return the proper webfinger files and atom feeds, to get the simplest version working.
I'm following this tutorial.
The way I understood it, I need to create hosts-meta, which points to the user resource, which links to his atom activity feed. Did I get that right? Is there anything else I need to do to get it to work?
My /.well-known/host-meta:
<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'
xmlns:hm='http://host-meta.net/xrd/1.0'>
<hm:Host>lumenwrites.com</hm:Host>
<Link rel='lrdd'
template='http://lumenwrites.com/.well-known/webfinger?resource={uri}'>
<Title>Profile</Title>
</Link>
</XRD>
My /.well-known/webfinger?resource=acct:[email protected]:
<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
<Subject>acct:[email protected]</Subject>
<Alias>http://lumenwrites.com/</Alias>
<Link rel="http://schemas.google.com/g/2010#updates-from"
type="application/atom+xml"
href="http://lumenwrites.com/feed/posts.atom" />
</XRD>
I am getting an error "422 Remote account could not be resolved".
Could you help me out?
I think you also need a salmon endpoint (rel=salmon), a public key (rel=magic-public-key) and a profile page (rel=http://webfinger.net/rel/profile-page).
I've managed to get as far as Mastodon finding my profile info from my Webfinger endpoint. However it doesn't show any posts in the preview. It does subscribe to the PubSubHubbub hub when I click follow, and I can see that it sends the Salmon payload about the follow request. I just can't figure out why it doesn't see my posts. I even tried copying the exact format of a mastodon atom feed but it can't find those.
Afaik it doesn't automatically fetch posts from the feed and rather rely on PubSubHubbHubb instead
When you search for someone in the search box, a preview of the profile loads in the farthest right box. It shows the number of posts, and then loads the posts below that. That happens before a PubSubHubbub subscription is created.
That only happens because your instance already has received those toots (either through PubSubHubbub, salmon requests mentioning you, a boost, or a few other reasons)
Okay, I guess that makes sense.
Now I'm to the point where Mastodon.social has subscribed to my hub (I can see the subscription in my logs), and my hub is making the delivery request to Mastodon when I publish a new post. (I even have another subscriber that I don't know where it came from!) However I'm still not seeing any posts appear.
It sounds like "what is the bare minimum to let people follow me on Mastodon?" is still unanswered. I'd like to know for myself as well. Based on comments above it sounds like...
.well-known/webfinger?resource=acct:[email protected].well-known/host-metaan Atom feed with activitystream data
Just an Atom feed will do too, but it needs to contain a link to a Pubsubhubbub hub
webfinger support
Yes. Link to Atom feed, link to profile, link to salmon, magic key
an XRD at .well-known/host-meta
No longer required.
I think that's all
federating between mastodon and blogs is exciting! a few of us are trying to get this working right now.
e.g. @miklb on https://miklb.com/ has an atom feed (https://miklb.com/feed/atom/ ) with PuSH hub link, and https://miklb.com/.well-known/webfinger?resource=acct:[email protected] (after you follow the redirect) serves webfinger with atom, profile, salmon, and magic key links.
...however, when i type @[email protected] into the search box on https://mastodon.technology/ (running 1.6.0) and press enter, i get 500 Internal Server Error. cc @ashfurrow, the admin there.
i'll test locally against master head, may be fixed since 1.6.0.
I'll add that on mastodon.social it simply returns no results.
Most helpful comment
Just an Atom feed will do too, but it needs to contain a link to a Pubsubhubbub hub
Yes. Link to Atom feed, link to profile, link to salmon, magic key
No longer required.
I think that's all