Filed an Issue Post Via Email (reading.am)
Post Via Email Send a link in the body of an email to this address and we'll post it to your account. It's handy for posting from your phone or favorite app, so save it in your address book for easy access. But remember, keep it super secret because anyone who has it can post!
@reading It looks like posting via email is having issues? Error shows: “the domain mailman.reading.am couldn’t be found.”

Using IFTTT to syndicate (PESOS) content from social services to WordPress using Micropub

Introduction

What follows may tend toward the jargon-y end of programming, but I’ll endeavor to explain it all and go step-by-step to allow those with little or no programming experience to follow along and use the tools I’m describing in a very powerful way.  I’ll do my best to link the jargon to definitions and examples for those who haven’t run across them before. Hopefully with a bit of explanation, the ability to cut and paste some code, or even make some basic modifications, you’ll be able to do what I and others have done, but without having to puzzle it all out from scratch.

Most readers are sure to be aware of the ubiquitous “share” buttons that appear all over the web. Some of the most common are “share to Facebook” or “share to Twitter”. In my examples that follow, I’m doing roughly the same thing, but I’m using technology called webhooks and micropub to be able to share not just a URL or web address, but a variety of other very specific data in a specific way to my website.

This “share”–while a little more complicated–gives me a lot more direct control over the data I’m sending and how it will be seen on my website. I would hope that one day more social websites will have built in share buttons that allow for direct micropub integration so that instead of only sharing to corporate sites like Facebook, Twitter, et al. they’ll let people share directly to their own personal websites where they can better control their online identity and data. What I’m describing below is hopefully a temporary band-aid that allows me to keep using common social services like Pocket, YouTube, Meetup, Goodreads, Letterboxd, Diigo, Huffduffer, Reading.am, Hypothes.is, and hundreds of others but to also post the content to my site so that I own and control more of my own online data.

An example using Pocket

Following in the footsteps of Charlotte Allen and Jan-Lukas Else, I’ve been tinkering around with improving some of my syndication workflows for a number of social silos including Pocket, a social silo that focuses on bookmarking material to read later.

I have long used IFTTT (aka If This, Then That), a free and relatively simple web service that allows one to create applets that tie a large number of web-based and social services together, to send data from my Pocket account to my WordPress-based website. I’d done this using my Pocket RSS feed to create WordPress draft posts that I could then modify if necessary and publish publicly if I desired. Since I regularly use a number of Micropub clients in conjunction with the WordPress Micropub plugin and IFTTT supports webhooks, I thought I’d try that out as a separate process to provide a bit less manual pain in mapping the data for posts to appear like I want them to on my website. 

Now I can use my Pocket account data and map most of it directly to the appropriate data fields on my website. Because Pocket has direct integration into IFTTT, I can actually get more data (particularly tags) out of it than I could before from the simple RSS feed.

Below, you’ll find what I’ve done with a quick walk through and some example code snippets. I’ll break some of it down into pieces as I go, and then provide a specific exemplar of some of the code properly strung together at the end. I’ll also note that this general procedure can be used with a variety of other silos (and either their integrated data or RSS feeds) within IFTTT to post data to your website. Those running platforms other than WordPress may be able to use the basic recipe presented here with some small modifications, to send similar data from their accounts to their sites that support Micropub as well. 

Directions for connecting IFTTT to publish to WordPress via Micropub

Preliminaries

Install and activate the Micropub plugin for WordPress. This will give your website a server endpoint that IFTTT will use to authenticate and send data to your website on your behalf.

If you don’t already have it, install the IndieAuth plugin for WordPress and activate it. This will allow you to generate an authorization token (think password) with the appropriate scopes (think permissions to do specific actions on your website) to allow IFTTT to securely post to your website. 

Within the WordPress administrative interface/dashboard go to Users >> Mange Tokens or go to the path /wp-admin/users.php?page=indieauth_user_token on your website. 

At the bottom of that page under the section “Add Token” add a convenient name for your new token. You’ll see in the following screencapture that I’ve used “IFTTT for Webhooks”. Next click the check boxes to add scopes for “create” and “media”. Finally click the “Add New Token” button.

Screencapture from the Add Token section of the User >> Manage Tokens page

On the resulting page, copy the entirety of the returned access token in a safe place. You’ll need this token later in the process and once you’ve navigated away from the page, there’s no way to retrieve the token again later. The same token can be used for multiple different recipes within IFTTT,  though one could create a different token for each different recipe if desired.

Sign up for an IFTTT account (if you don’t already have one). 

Register Pocket as a service you can use within IFTTT.

The IFTTT Applet

In your IFTTT.com account, create a new applet.

Screenshot of the "If This Then That" recipe start with "This" highlighted

For the “if” part of the applet, search for and choose the Pocket application.

Screenshot of a search for "Pocket"

Choose the trigger “Any new item” (other triggers could be chosen for different combinations of actions).

Click the “then” part of the applet, and search for and chose the Webhooks application.

Screenshot of the "That" portion with a search for Webhooks

Choose the “Make a web request” option (currently the only option on the page).

Next we’ll fill in the action fields.

Screencapture of the Complete Action Fields step

 

Fill in the four action fields with the following values, with the appropriate modifications as necessary:

URL: https://www.example.com/wp-json/micropub/1.0/endpoint

Be sure to change example.com to the appropriate URL for your website. If you’re using a platform that isn’t WordPress in combination with the Micropub plugin, you can quickly find your appropriate endpoint by looking at your homepage’s source for a <link> element with a rel="micropub" attribute.

Method: POST
Content Type: application/x-www-form-urlencoded

More advanced users might experiment with other content types, but this will naturally require different data and formatting in the Body section.

Body: 

The Body portion is one of the most complicated portions of the operation, because this is where you can get creative in how you fill this out and the end results you end up with on your website. You can use the available variables in the recipe to custom create almost anything you like and some services will give you a tremendous amount of flexibility. I’ll walk through a handful of the most common options and then tie them all together at the end. Ultimately the Body will be a string of various commands that indicate the data you want to send to your website and all of those commands will be strung together with an ampersand character (“&“) between each of them.

There are some small differences you may want to experiment with in terms of what you put in the Body field based on whether or not you’re using the Post Kinds plugin to create your posts and reply contexts or if you’re not. 

Depending on which pieces you choose, I recommend doing a few test runs for your applets to make sure that they work the way you expect them to. (The Micropub plugin has a setting to mark incoming posts automatically as drafts, so you’re not spamming your readers while you’re testing options if you’re testing this on a live site.) Sometimes formatting issues (particularly with setting a publish time) may cause the post to fail. In these cases, experiment to find and excise the offending code and see if you can get things working with minimal examples before adding additional data/details.

For those who would like to get into more advanced territory with the programming and methods, I recommend looking at the W3C’s Webmention specification

The first thing you’ll want in the Body will be your access token. This is similar to a password that allows the webhook to publish from IFTTT to your website. You’ll want a line that reads as follows with the AccessTokenHere replaced with the access token from your token provider which you created earlier and saved. You’ll want to keep this secret because it acts like a password for allowing remote applications to post to your website.

access_token=AcessTokenHere

Next will come the content you want to be published to your site.

&content=<<<{{EntryTitle}}<br>{{EntryPublished}}>>>

I’ll mention that the content snippet can include almost anything you’d like using the variables provided by IFTTT as well as a reasonable variety of HTML. I’ve used it to add things like <blockquotes> for annotations and even <audio> tags for making listen posts or bookmarking audio with Huffduffer!

The following snippet tells your site what kind of content it’s receiving. Unless you’re doing something more exotic than bookmarks, likes, favorites, replies, or most post kinds (except maybe events), you’ll want to use the h-entry snippet as follows:

&h=entry

If you’d like your post to contain a formal title, then you’ll want to include the following code snippet. Generally with shorter content like notes/status updates, bookmarks, reads, likes, etc., I follow the practice of publishing titleless posts when they’re not required, so I personally skip this piece in most of my posts, but some may wish to include it.

&name=<<<{{Title}}>>>

To have your website create or use the correct category or tag taxonomies on your posts, you’ll want to have something similar to the following snippet. If you want to specify more than one category, just string them together with ampersands. If your category/tag has a blank space in it you can replace the spaces with %20. The Micropub server on your site should automatically check to see if you have categories or tags that match what is sent, otherwise it will create a new tag(s).

&category[]=Bookmark&category[]=Social%20Stream

I’ve found that in practice, some silos that allow for multiple tags will actually publish them via micropub using something along the lines of the following if the  appropriate variables on IFTTT exist. In these cases, I append this to the other categories and tags I want to specify.

&category[]=<<<{{Tags}}>>>

If you’re using your Pocket account to send your bookmarked articles to read later, you’ll want to create a bookmark with the following line:

&bookmark-of=<<<{{EntryUrl}}>>>

Alternatively, if you were using your Pocket account to archive your articles once you’ve actually read them, you could have IFTTT post these archived items as “reads” to your site by choosing the “New Item Archived” element in the Pocket portion of the IF set up process. Here you’d replace the above bookmark-of line with the following:

&read-of=<<<{{EntryUrl}}>>>

If you were creating different sorts of posts you might also use the appropriate alternate verbiage: like-of, watch-of, listen-of, rsvp, etc. (find details for the appropriate mark up on the IndieWeb wiki or the correct microformats v2 property within the code for the Post Kinds plugin). If you are using the Post Kinds plugin, this is the piece of data that it receives to specify the correct post kind and create the reply context for your post and will likely preclude you from needing to send any data in the content portion (above) unless the services applet will let you send additional commentary or notes that you want to appear in the body of your post.

Next, if your site supports syndication links with a plugin like Syndication Links for WordPress, you would use the following line of code so that those are set and saved properly. (This presumes that the URL specified is the permalink of the content on the social silo. I’ll note that Pocket doesn’t provide these (easily) as most of their links are canonical ones for the original content, so I don’t use this on my IFTTT recipe for my Pocket workflow, but I do use it for others like Huffduffer and Reading.am. It conveniently allows me to find copies of my content elsewhere on the web.)

&syndication=<<<{{EntryUrl}}>>>

If you’d like to have the timestamp on your post match the time when you actually bookmarked the item in Pocket, you’ll need to add the following line of code. Without this line, the publication time will match the time of the Webhook action, which for most IFTTT things can be a delay of a minute or two up to an hour or more afterwards. In practice, I’ve noticed that most content posts to my website within about 10-15 minutes of the original, and this is based on the polling lag within IFTTT checking your triggers. (Sadly, I’ll report that I’ve never gotten this code snippet to work for me in practice, and I suspect it may be because the time format from IFTTT doesn’t match what is expected by the Micropub server on my website. Perhaps David Shanske or Ryan Barrett may have a more specific idea about what’s causing this or suggest a fix? I’ll try to dig into it shortly if I can. As a result, I generally have left this snippet of code off of my triggers and they’ve worked fine as a result. Until this issue might be fixed, if you want to have the exact timestamp, you could alternately include the data, if provided, in the content section instead and then copy it over manually after-the-fact.)

&published=<<<{{EntryPublished}}>>>

If you’ve got syndication endpoints set up properly with something like the Syndication Links plugin, you can use the following sort of code snippet. I generally eschew this and prefer to save my posts as drafts for potential modification prior to publishing publicly, but others may have different needs, so I’m including the option for relative completeness so people can experiment with it if they like.

&mp-syndicate-to[]=twitter-bridgy

This concludes the list of things that might commonly be included in the Body portion of the IFTTT applet. Tying these all together for combination in the Post Kinds Plugin one would want something along the lines of :

Body: access_token=AccessTokenHere&content=<<<{{EntryTitle}}<br> {{EntryPublished}}>>>&h=entry&category[]=Bookmark&category[]=Social%20Stream&bookmark-of=<<<{{EntryUrl}}>>>

Here’s another example of the code I use in conjunction with a similar applet for Diigo, a bookmarking service. The “Description” portion allows me to add a note or comment on the bookmark when I make it and that note is transported over to the post on my website as well.

Body: access_token=AccessTokenHere&content=<<<{{Description}}>>>&h=entry&category[]=Bookmark&category[]=Social%20Stream&category[]=<<<{{Tags}}>>>&bookmark-of=<<<{{Url}}>>>

Note that when the string of commands is done, you do not need to have a trailing ampersand. Most of the examples I’ve used are from the Pocket set up within IFTTT, but keep in mind that other services on the platform may use alternate variable names (the portion in the braces {{}}). The differences may be subtle, but they are important so be careful not to use {{EntryTitle}} if your specific recipe expects {{Title}}.

To finish off making your new applet, click on the “Create Action” button. (If necessary, you can test the applet and come back to modify it later.)

Finally, give your applet an appropriate tile and click the “Finish” button. For my Pocket applet I’ve used the name “Pocket bookmark PESOS Micropub to WordPress”.

Screencapture of the Review and Finish page on IFTTT

Now that your applet is finished, give it a whirl and see if it works the way you expect! Don’t feel discouraged if you run into issues, but try experimenting a bit to see if you can get the results you’d like to see on your website. You can always go back to your applet recipe and modify it if necessary.

Conclusion

Hopefully everyone has as much fun as I’ve had using this workflow to post to their websites. It may take some patience and experimentation to get things the way you’d like to have them, but you’re likely to be able to post more easily in the future. This will also let you own your data as you create it while still interacting with your friends and colleagues online.

I know that it may be possible to use other services like Zapier, Integromat, Automate.io, or other similar services instead of IFTTT though some of these may require paid accounts. I’d love to see what sorts of things people come up with for using this method for owning their own data. Can you think of other services that provide webhooks for potential use in combination with Micropub? (Incidentally, if this is your first foray into the Micropub space, be sure to check out the wealth of free Micropub clients you can use to publish directly to your website without all of the set up and code I’ve outlined above!)

Currently I’m using similar workflows to own my data from social services including Pocket, Diigo, Huffduffer, Reading.am, YouTube, Meetup/Google Calendar, and Hypothes.is. I’ve got several more planned shortly as well.

Thanks once again to Charlotte Allen and subsequently Jan-Lukas Else for the idea of using Micropub this way. Their initial documentation was invaluable to me and others are sure to find it useful. Charlotte has some examples for use with Facebook and Instagram and Jan-Lukas’ example may be especially helpful for those not using WordPress-specific solutions.

And as always, a big thank you to the entire IndieWeb community for continuing to hack away at making the web such a fun and vibrant space by making the small building blocks that make all of the above and so much more possible.

Replied to Reading.am · Issue #2057 · simple-icons/simple-icons by David Shanske (GitHub)
Name: Reading.am Website: https://www.reading.am Official resources for icon and color: Their logo is on the front of their site, and is a black and white hand.
Reading.am has generally used the “Victory hand” aka “peace sign” emoji as their logo/icon, so perhaps a similarly converted emoji to svg would suffice in this case.

Perhaps something along the lines of https://commons.wikimedia.org/wiki/File:Emojione_270C.svg ?

Social Reading User Interface for Discovery

I read quite a bit of material online. I save “bookmarks” of all of it on my personal website, sometimes with some additional notes and sometimes even with more explicit annotations. One of the things I feel like I’m missing from my browser, browser extensions, and/or social feed reader is a social layer overlay that could indicate that people in my social network(s) have read or interacted directly with that page (presuming they make that data openly available.)

One of the things I’d love to see pop up out of the discovery explorations of the IndieWeb or some of the social readers in the space is the ability to uncover some of this social reading information. Toward this end I thought I’d collect some user interface examples of things that border on this sort of data to make the brainstorming and building of such functionality easier in the near future.

If I’m missing useful examples or you’d like to add additional thoughts, please feel free to comment below.

Examples of social reading user interface for discovery

Google

I don’t often search for reading material directly, but Google has a related bit of UI indicating that I’ve visited a website before. I sort of wish it had the ability to surface the fact that I’ve previously read or bookmarked an article or provided data about people in my social network who’ve done similarly within the browser interface for a particular article (without the search.) If a browser could use data from my personal website in the background to indicate that I’ve interacted with it before (and provide those links, notes, etc.), that would be awesome!

Screen capture for Google search of Kevin Marks with a highlight indicating that I've visited this page in the recent past
Screen capture for Google search of Kevin Marks with a highlight indicating that I’ve visited his page several times in the past. Given the March 2017 date, it’s obvious that the screen shot is from a browser and account I don’t use often.

I’ll note here that because of the way I bookmark or post reads on my own website, my site often ranks reasonably well for those things.

On a search for an article by Aaron Parecki, my own post indicating that I’ve read it in the past ranks second right under the original.

In some cases, others who are posting about those things (reading, commenting, bookmarking, liking, etc.) in my social network also show up in these sorts of searches. How cool would it be to have a social reader that could display this sort of social data based on people it knows I’m following

A search for a great article by Matthias Ott shows that both I and several of my friends (indicated by red arrows superimposed on the search query) have read, bookmarked, or commented on it too.

Hypothes.is

Hypothes.is is a great open source highlighting, annotation, and bookmarking tool with a browser extension that shows an indicator of how many annotations  appear on the page. In my experience, higher numbers often indicate some interesting and engaging material. I do wish that it had a follower/following model that could indicate my social sphere has annotated a page. I also wouldn’t mind if their extension “bug” in the browser bar had another indicator in the other corner to indicate that I had previously annotated a page!

Screen capture of Vannevar Bush’s article As We May Think in The Atlantic with a Hypothes.is browser extension bug indicating that there are 329 annotations on the page.

Reading.am

It doesn’t do it until after-the-fact, but Reading.am has a pop up overlay through its browser extension. It adds me to the list of people who’ve read an article, but it also indicates others in the network and those I’m following who have also read it (sometimes along with annotations about their thoughts).

What I wouldn’t give to see that pop up in the corner before I’ve read it!

Reading.am’s social layer creates a yellow colored pop up list in the upper right of the browser indicating who else has read the article as well as showing some of their notes on it. Unfortunately it doesn’t pop up until after you’ve marked the item as read.

Nuzzel

Nuzzel is one of my favorite tools. I input my Twitter account as well as some custom lists and it surfaces articles that people in my Twitter network have been tweeting about. As a result, it’s one of the best discovery tools out there for solid longer form content. Rarely do I read content coming out of Nuzzel and feel robbed. Because of how it works, it’s automatically showing those people in my network and some of what they’ve thought about it. I love this contextualization.

Nuzzel’s interface shows the title and an excerpt of an article and also includes the avatars, names, network, and commentary of one’s friends that interacted with the piece. In this example it’s relatively obvious that one reader influenced several others who retweeted it because of her.

Goodreads

Naturally sites for much longer form content will use social network data about interest, reviews, and interaction to a much greater extent since there is a larger investment of time involved. Thus social signaling can be more valuable in this context. A great example here is of Goodreads which shows me those in my network who are interested in reading a particular book or who have written reviews or given ratings.

A slightly excerpted/modified screen capture of the Goodreads page for Melanie Mitchell’s book Complexity that indicates several in my social network are also interested in reading it.

Are there other examples I’m missing? Are you aware of similar discovery related tools for reading that leverage social network data?

👓 An error unexplained | Jeremy Cherfas

Read An error unexplained by Jeremy Cherfas (jeremycherfas.net)
Well, that was weird. Something had gone wrong with my little PHP script for adding items from my list at reading.am to my WithKnown-powered stream. It ran, reported no errors, and yet produced nothing at the other end. Gorgeous Saturday morning, blue skies and sunshine; what better way to spend it than indoors debugging?

👓 Sixteen Years of Blogging | Interdependent Thoughts

Read Sixteen Years of Blogging by Ton ZijlstraTon Zijlstra (zylstra.org)
Today at 14:07, sixteen years ago I published my first blogpost. The first few months I posted on Blogger, but after 6 months, deciding having a blog was no longer just an experiment, I moved to my own domain and where it has since resided. First it was hosted at a server I ran from my home, later I...
Congratulations!

👓 How the Case for Voter Fraud Was Tested — and Utterly Failed | ProPublica

Read How the Case for Voter Fraud Was Tested — and Utterly Failed (ProPublica)
From a new Supreme Court ruling to a census question about citizenship, the campaign against illegal registration is thriving. But when the top proponent was challenged in a Kansas courtroom to prove that such fraud is rampant, the claims went up in smoke.
I knew the voter fraud panel Trump convened had fizzled, but I didn’t hear that there was a court case and the concept flopped so painfully. This is some fantastic reporting. Glad I ran back across it while looking at the midterm elections results relating to Georgia and the massive voter suppression efforts that have been happening there this year.

👓 Brian Kemp’s Lead in Georgia Needs an Asterisk | The Atlantic

Read Brian Kemp’s Lead in Georgia Needs an Asterisk (The Atlantic)
If the governor’s race had taken place in another country, the State Department would have questioned its legitimacy.

👓 Good early sign for Democrats: Jennifer Wexton unseats GOP Rep. Barbara Comstock in Virginia | CNBC

Read Good early sign for Democrats: Jennifer Wexton unseats GOP Rep. Barbara Comstock in Virginia by Christina Wilkie (CNBC)
Voters in the affluent Northern Virginia suburban district have sent Republicans to Congress for 60 of the past 66 years.
Breathing a tad easier in math class tonight now…

👓 Fox News, NBC, and Facebook pulled Trump’s racist campaign ad. He’s not happy about it. | Vox

Read Fox News, NBC, and Facebook pulled Trump’s racist campaign ad. He’s not happy about it. (Vox)
The latest controversy over Trump’s final campaign ad, explained.

👓 Election Update | Facebook Newsroom

Read Election Update (Facebook Newsroom)
US law enforcement contacted us about online activity that they recently discovered and believe may be linked to foreign entities.
This seems like a lot of lip service to me. I can’t imagine they’re doing much more than scratching the surface of what they should be doing.

👓 "Little Foot" hominin skeleton from South Africa will finally be open to other scientists | Michael Balter

Read After more than 20 years in the hands of one researcher, the nearly complete "Little Foot" hominin skeleton from South Africa will finally be open to other scientists at the end of November (michael-balter.blogspot.com)
In 1994, Ron Clarke, a paleoanthropologist at the University of the Witwatersrand in Johannesburg, South Africa, was looking through some museum boxes filled with fossil specimens from the Sterkfontein caves, located about 40 kilometers northwest of the city. Beginning in the 1930s, a number of hominin fossils had been found there, mostly australopithecines, in what South Africans call the Cradle of Humankind. Clarke quickly realized that four of the fossils, all small toe bones, had been misidentified as belonging to monkeys. They actually belonged to an early hominin, most likely another australopithecine. It quickly became known as "Little Foot."

👓 We Saw Nuns Kill Children: The Ghosts of St. Joseph’s Catholic Orphanage | Buzz Feed News

Read Nuns Killed Children, Say Former Residents Of St. Joseph’s Catholic Orphanage (BuzzFeed News)
Millions of American children were placed in orphanages. Some didn’t make it out alive.
Finally getting back to read the second half of this harrowing article. People can be horrid, but it really pains me that the Catholic Church could have been this violently horrible. This makes the Inquisition look like a field day.

📺 The Facebook Dilemma (Part 2) | Frontline | PBS

Watched The Facebook Dilemma (Part 2) from FRONTLINE | PBS

A major, two-night investigation of the powerful social media platform’s impact on privacy and democracy in the U.S. and around the world.

SEASON 37: EPISODE 4: The promise of Facebook was to create a more open and connected world. But from the company’s failure to protect millions of users’ data, to the proliferation of “fake news” and disinformation, mounting crises have raised the question: Is Facebook more harmful than helpful? On Monday, Oct. 29, and Tuesday, Oct. 30, 2018, FRONTLINE presents The Facebook Dilemma. This major, two-night event investigates a series of warnings to Facebook as the company grew from Mark Zuckerberg’s Harvard dorm room to a global empire. With dozens of original interviews and rare footage, The Facebook Dilemma examines the powerful social media platform’s impact on privacy and democracy in the U.S. and around the world.

This documentary focuses on just one of the major failings of Facebook and its attendant effects on society. If you’re using Facebook, you should watch both parts before continuing to support them.

I’m not quite sure what to label this particular type of failure. Tragedy of the commons? It’s painfully obvious that Facebook not only has no real idea how to solve this problem, but it’s even more telling that they don’t seem to have any desire or drive to solve it either.  The more I watch what they’re doing to their product and their users, the more I think that they have absolutely no ethics or morality at all. In particular Mark Zuckerberg  is completely tone deaf in these areas, and as a result the entire fish stinks from the head.

The only solution may be massive regulation. The sadder part is that with both their financing and lobbying power, not to mention their social influence power which could be leveraged completely via dark posts, they could have a painfully out-sized influence on elections to get their own way.

I’m really worried that things will get far worse before they get better.