Trackbacks¶
This library includes support for Trackback URL Discovery and sending Trackbacks.
Trackback URL discovery¶
The IndieWeb Utils Trackback discovery performs the following steps:
Checks for a trackback:ping attribute in an RDF comment. If one is found, this is returned.
Checks for an EditURI <link> tag. If one is found, its contents are retrieved. If the contents contain a trackback:ping attribute, this is returned.
Send a Trackback¶
The send_trackback function sends a Trackback to a given URL. Discovery is performed on the target_url to find its Trackback endpoint, to which a Trackback is sent.
Validate a Trackback¶
The process_trackback function validates data from a trackback response sent to an endpoint. You can use this function to:
Make sure a request has the required content type and method. If an error is found, a string with an RDF error is returned that can be sent by the server back to the client;
Send an error response if the source site is not in a list of allowed sites (optional) and;
Send a success response if the Trackback is valid.