talk
talk copied to clipboard
Web Monetization on comments that have been highlighted by page authors
Search Terms
Monetization, Monetisation, Highlight
Suggestion
We are developing a feature that lets page authors highlight comments, thereby sharing revenue from readers with comment authors. We were hoping for feedback from the community on our technical approach.
Use Cases
- As an article author I'd like to highlight comments so that I can reward commenters with a share of micropayments (using Coil.com), thereby incentivising participation.
- As a commenter I'd like to add my micropayment wallet address so that I can get rewarded for a comment if selected by the author.
This is designed to drive engagement, discover new incentives/resources for participants, and experiment with new web economics models (specifically programmable micropayments).
Feature design: Custom moderation endpoint as a Docker service
We take custom moderation phases as our basis for implementing custom behaviour.
In order to achieve our desired functionality, we are running a Docker-based service that listens via a moderation phase to special comments that we inject into the Coral iframe's comments box.
These comments (e.g. {commenter_wallet: [wallet_string]}) are parsed by our service with the relevant contents stored in a JSON file, which the article page reads on load. For a given article, if it finds any of a) author wallet, b) author highlighted comment, c) highlighted commenter's wallet in the JSON file, it enables web monetization for the page, with a probabalistic revenue share between author and commenter (https://coil.com/p/sharafian/Probabilistic-Revenue-Sharing/8aQDSPsw).
We chose to inject special messages and read them via a moderation phase as there is a secure handshake between moderation phase endpoints and Coral, and each comment that gets sent to the endpoint includes required information such as Coral userID, without which we couldn't derive c) from b), which is essential to our requirements.
This approach feels quite "hacky" to us, as we are using a moderation phase for our own ends. Our manipulation of the Coral iframe is essentially Cross-site scripting; we have got it working by editing the main base template of Coral, and including a link to a script from our service. This enables us to use postMessage to legitimately meet the same origin security policy.
Coral Talk contains a postMessage wrapper that is currently only used to set an authentication ID. We have considered proposing a contribution to Coral core of updating this wrapper so that it is always listening to the host page, and will execute a function legitimately passed by the parent page. This feature would enable our functionality, and could also enable other plugins for other use cases.
We are interested in general comments on our approach. If there are any issues people can foresee with us using a moderation phase in this way, we'd love to hear them. Or other ways people suggest we approach the problem. Would this feature be best built into core, rather than developing an external service?
I'm happy to explain any of the above in greater detail/clarity if anyone's interested in this feature.