Skip to content
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
1 task done
lumenwrites opened this issue Apr 10, 2017 · 10 comments
Closed
1 task done
Labels
api REST API, Streaming API, Web Push API expertise wanted Extra expertise is needed for implementation

Comments

@lumenwrites
Copy link
Contributor

lumenwrites 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.
@wxcafe wxcafe added api REST API, Streaming API, Web Push API expertise wanted Extra expertise is needed for implementation question labels Apr 10, 2017
@ClearlyClaire
Copy link
Contributor

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
Copy link

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.

@ClearlyClaire
Copy link
Contributor

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

@aaronpk
Copy link

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.

@ClearlyClaire
Copy link
Contributor

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
Copy link

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
Copy link

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
Copy link
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
Copy link

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
Copy link

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
Labels
api REST API, Streaming API, Web Push API expertise wanted Extra expertise is needed for implementation
Projects
None yet
Development

No branches or pull requests

8 participants