From 53964f2622828bc5b67546dbc24bb455e4d165cb Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sat, 17 Dec 2016 16:05:29 -0800 Subject: [PATCH] update docs on syndicate-to response --- views/docs.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/views/docs.php b/views/docs.php index 63d0ce1..7c6757d 100644 --- a/views/docs.php +++ b/views/docs.php @@ -34,7 +34,7 @@

Syndication Targets

-

You can provide a list of supported syndication targets that will appear as checkboxes when you are creating a new post.

+

You can provide a list of supported syndication targets that will appear as checkboxes when you are creating a new post.

To do this, your Micropub endpoint will need to respond to a GET request containing a query string of q=syndicate-to. This request will be made with the access token that was generated for this app, so you can choose which syndication targets you want to allow this app to use.

@@ -44,17 +44,24 @@ Authorization: Bearer xxxxxxxxxx HTTP/1.1 200 OK -Content-type: application/x-www-form-urlencoded - -syndicate-to[]=twitter.com%2Faaronpk&syndicate-to[]=facebook.com%2Faaronpk +Content-type: application/json + +{ + "syndicate-to": [ + { + "uid": "https://twitter.com/aaronpk", + "name": "twitter.com/aaronpk" + }, + { + "uid": "https://news.indieweb.org/en", + "name": "IndieNews" + } + ] +} -

The response should be a form-encoded reply with an array, syndicate-to of all the supported syndication targets. The actual values are up to your Micropub endpoint, but a good convention is to use the domain name of the service (e.g. twitter.com), or domain name and username (e.g. twitter.com/aaronpk).

- -

If you do include the domain name, Quill will be able to show icons for recognized services next to the checkboxes.

+

The specific values of names and uids are up to your Micropub endpoint, but a good convention is to use the domain name of the service (e.g. https://twitter.com), or domain name and username (e.g. https://twitter.com/aaronpk) for the uid, and a friendly name like "Twitter" or "twitter.com/aaronpk" as the name.

Quill will check for your supported syndication targets when you sign in, but there is also a link on the new post screen to manually re-check if you'd like.

- -