1 #+title: About sending pingbacks, webmentions and some thoughts on how to improve on them.
2 #+filetags: indieweb blogging open_web
3 #+date: 2023-10-31T20:41:30+08:00
5 In a 'blast from the past', I sent my first
6 [[https://www.hixie.ch/specs/pingback/pingback][pingback]] after writing
7 the [[previous post|agent based models digital twins]]. A pingback is a
8 way for a blogger to send a message to another blogger, informing them
9 they've written a post that refers to theirs, e.g. as a reply or an
10 extension of the ideas raised.
12 The process is a bit more involved than using a
13 [[https://www.w3.org/TR/webmention/][webmention]], which I've used
14 before and [[implemented support for|Implementing webmention on my
15 blog]] a while back, due to requiring an XML message to be created
16 rather than a simple exchange of URLs.
18 First, I created a file =pingback.xml= containing the URLs of the blog
19 post I wrote and the one I made reference to within my post. The
20 standard defines the schema, resulting in the following:
23 <?xml version="1.0" encoding="UTF-8"?>
25 <methodName>pingback.ping</methodName>
28 <value><string>https://www.vanrenterghem.biz/blog/posts/agent_based_models_digital_twins/</string></value>
31 <value><string>https://johncarlosbaez.wordpress.com/2023/10/25/software-for-compositional-modeling-in-epidemiology/</string></value>
37 Next, I used =curl= on the command-line to send this file in a POST
38 request to Wordpress's pingback service. I had to use the =-k= option to
39 make this work - bypassing verification of the TLS certificate.
42 curl -k https://johncarlosbaez.wordpress.com/xmlrpc.php -d @pingback.xml
45 In a sign things were going well, I saw the following appear in my
49 192.0.112.141 - - [29/Oct/2023:09:35:06 +0100] "GET /blog/posts/agent_based_models_digital_twins/ HTTP/1.1" 200 2676
50 "https://www.vanrenterghem.biz/blog/posts/agent_based_models_digital_twins/"
51 "WordPress.com; https://johncarlosbaez.wordpress.com; verifying pingback
55 Finally, I received the following response to my =curl= request on the
59 <?xml version="1.0" encoding="UTF-8"?>
64 <string>Pingback from https://www.vanrenterghem.biz/blog/posts/agent_based_models_digital_twins/ to https://johncarlosbaez.wordpress.com/2023/10/25/software-for-compositional-modeling-in-epidemiology/ registered. Keep the web talking! :-)</string>
71 That "Keep the web talking! :-)" message made me smile.
73 In order to understand a bit better how things were being processed, I
74 checked the Wordpress code for its pingback service, and it appears they
75 [[https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-xmlrpc-server.php?rev=56637#L7040][take
76 the title of the linked article as the author]], which seems a bit odd.
77 The pingback standard didn't allow for anything but the swapping out of
78 links though. How your reference is summarized on the referred site is
79 entirely left to recipient - who may process pingbacks manually or use a
80 service automating (parts of) the processing.
82 Wordpress processes pingbacks automatically, turning them into comments
83 on the original post. As the comment text,
84 [[https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-xmlrpc-server.php?rev=56637#L7036][Wordpress
85 uses the link text in the anchor element]] with a horizontal ellipsis
86 around it, and some filtering to prevent the comment from being too
87 long. It's odd how the standard didn't define further approaches to make
88 this a bit easier. A pingback attribute in the anchor element would have
89 been helpful for instance, as we could put some text in there to
90 summarise our page when the pingback is processed automatically. Most
91 surprisingly maybe, with the benefit of hindsight, it would have been
92 interesting had the subsequent standard that emerged, Webmention,
93 implemented some further enhancements.
94 [[https://aaronparecki.com/][Aaron Parecki]], author of the Webmention
95 W3C Recommendation, might know if that was ever considered, or just not
96 within the use case for pingbacks / webmentions? There seemed to have
97 been [[https://aaronparecki.com/2019/10/15/26/][some thought put into it