In my previous post I experimented with using https://brid.gy/ to send a webmention for the purpose of auto-posting to Twitter.

As another piece to the indieweb puzzle, I found a post on Aaron Parecki’s site, “Sending your First Webmention from Scratch,” that I thought I would try.

Essentially we want to manually use HTML markup using microformat extensions to create the webmention, like this:

<div class="h-entry">
    <div class="u-author h-card">
      <img src="https://kendallgiles.com/media/kendall_navy_embark_profile_pic_120_square-compressor.png" class="u-photo" width="40">
      <a href="https://kendallgiles.com/" class="u-url p-name">Kendall Giles</a>
    </div>
    <p>in reply to: <a class="u-in-reply-to" href="https://aaronparecki.com/2018/06/30/11/your-first-webmention">@aaronpk</a></p>
    <p class="e-content">Trying out this guide to sending webmentions</p>
    <p>
      <a href="https://kendallgiles.com/2018/07/and_now_to_tackle_webmentions/" class="u-url">
        <time class="dt-published" datetime="2018-07-23T09:05:58Z">July 23, 2018</time>
      </a>
    </p>
</div>

Next, I need to discover the target’s webmention endpoint:

curl -si https://aaronparecki.com/2018/06/30/11/your-first-webmention | grep rel=\"webmention\"

which returns a response like this:

 <link rel="webmention" href="https://webmention.io/aaronpk/webmention">

The bit after the href is the URL of the target’s webmention endpoint that I need to extract.

Then I need to craft the POST request to send the webmention to the discovered webmention endpoint:

curl -si https://webmention.io/aaronpk/webmention \
  -d source=https://kendallgiles.com/2018/07/and_now_to_tackle_webmentions/ \
  -d target=https://aaronparecki.com/2018/06/30/11/your-first-webmention

When I ran this, I got a status message:

Status: 201 Created

I do see my webmention on the target site–it looks like this:

manual_webmentions_send_results.png

So, technically, it worked, but for some reason my author photo didn’t appear. Will need to investigate. Hopefully I’ll also be able to automate this process into something more user-friendly.