New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is necessary for Mastodon to be able to fetch my profile and a list of posts from my blog? #1441

Closed
raymestalez opened this Issue Apr 10, 2017 · 10 comments

Comments

Projects
None yet
8 participants
@raymestalez
Contributor

raymestalez commented Apr 10, 2017

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:lumen@lumenwrites.com:

<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
 
    <Subject>acct:lumen@lumenwrites.com</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 searched or browsed the repo’s other issues to ensure this is not a duplicate.
@ThibG

This comment has been minimized.

Show comment
Hide comment
@ThibG

ThibG Apr 10, 2017

Collaborator

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).

Collaborator

ThibG commented Apr 10, 2017

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).

@aaronpk

This comment has been minimized.

Show comment
Hide comment
@aaronpk

aaronpk Apr 20, 2017

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.

aaronpk commented Apr 20, 2017

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.

@ThibG

This comment has been minimized.

Show comment
Hide comment
@ThibG

ThibG Apr 20, 2017

Collaborator

Afaik it doesn't automatically fetch posts from the feed and rather rely on PubSubHubbHubb instead

Collaborator

ThibG commented Apr 20, 2017

Afaik it doesn't automatically fetch posts from the feed and rather rely on PubSubHubbHubb instead

@aaronpk

This comment has been minimized.

Show comment
Hide comment
@aaronpk

aaronpk Apr 20, 2017

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.

aaronpk commented Apr 20, 2017

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.

@ThibG

This comment has been minimized.

Show comment
Hide comment
@ThibG

ThibG Apr 20, 2017

Collaborator

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)

Collaborator

ThibG commented Apr 20, 2017

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)

@aaronpk

This comment has been minimized.

Show comment
Hide comment
@aaronpk

aaronpk Apr 20, 2017

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.

aaronpk commented Apr 20, 2017

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.

@fenwick67

This comment has been minimized.

Show comment
Hide comment
@fenwick67

fenwick67 May 21, 2017

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...

  • an Atom feed with activitystream data
  • webfinger support for finding users at .well-known/webfinger?resource=acct:username@site.com
    • which rels are required?
  • an XRD at .well-known/host-meta
    • which rels are required?

#1391 is related.

fenwick67 commented May 21, 2017

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...

  • an Atom feed with activitystream data
  • webfinger support for finding users at .well-known/webfinger?resource=acct:username@site.com
    • which rels are required?
  • an XRD at .well-known/host-meta
    • which rels are required?

#1391 is related.

@Gargron

This comment has been minimized.

Show comment
Hide comment
@Gargron

Gargron May 21, 2017

Member

an 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

Member

Gargron commented May 21, 2017

an 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

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Oct 18, 2017

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:me@miklb.com (after you follow the redirect) serves webfinger with atom, profile, salmon, and magic key links.

...however, when i type @me@miklb.com 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.

snarfed commented Oct 18, 2017

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:me@miklb.com (after you follow the redirect) serves webfinger with atom, profile, salmon, and magic key links.

...however, when i type @me@miklb.com 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.

@miklb

This comment has been minimized.

Show comment
Hide comment
@miklb

miklb Oct 18, 2017

I'll add that on mastodon.social it simply returns no results.

miklb commented Oct 18, 2017

I'll add that on mastodon.social it simply returns no results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment