DEV Community

Cover image for Fact Checking COVID-19 Chain Texts with Twilio

Fact Checking COVID-19 Chain Texts with Twilio

cddelta profile image CDDelta Updated on ・4 min read

This is my submission for the Twilio Hackathon.

What I built

I built a tool that helps fact check claims on messaging platforms. We've all seen these messages of questionable origin before forwarded from others. They are a highly effective way of sharing fake news, a problem that has only gotten worse amid the current pandemic. Experts are calling this an infodemic. WhatsApp has even gone so far as to limit the forwarding of messages to stem this issue. There, however, does not seem to be a simple solution for fact-checking these messages as you might see on Facebook or Twitter which is where my tool comes in.

To use it, users simply send a message to a number with the claim they would like to fact-check prepended with "/". They will then receive a message with information on the claim they sent in.

sms responder

If the claim is new, it will be logged to be fact-checked in the dashboard at a later time.

claim edit

Every time a claim is sent in, non-personally identifiable analytics is collected to track the spread of these messages through time and around the world which can hopefully help journalists g and interested parties identify trends in the data.

claim detail

Category Submission:

COVID-19 Communications


Responder: +18562635931

Link to Code


How I built it

I built the SMS responder using Twilio's Programmable SMS product with a webhook to a Firebase Function. Using Twilio made accepting and replying to messages very easy, coupled with Firebase's serverless nature, I was able to get a minimal prototype of the responder in just about an hour.

The responder saves claims it receives into Firestore for fact-checking and publishes a PubSub message to trigger another cloud function to aggregate analytics off the hot path and be read by the dashboard later.

The dashboard was built using Angular since it was what I was most familiar with. This was my first project using Angular 9 with all its Ivy related improvements such as faster compilation and improved developer experience and it was truly a joy to work with. Fast hot reload and type-checked templates made iterating fast. The dashboard reads and writes data directly from Firestore and does passwordless sign in for fact-checkers using Firebase Authentication.

architecture diagram

The diagram says Cloud Datastore because I couldn't find a Firestore icon 😢.


This tool is merely a proof of concept of what can be done to stem the spread of fake news on messaging platforms. Obviously, running a fact-checking system is a lot more complicated than what can be done by a single person, involving other professionals etc. But I hope someone is inspired by what I built here to actually deploy something similar in production.

On the software side, there are a lot more possible improvements. Taking advantage of Twilio, the SMS responder can be extended to work beyond SMS to work on WhatsApp, Line, Messenger, Telegram etc. Channel analytics can be collected to track the spread of claims across messaging platforms. An audit trail system can be implemented in the dashboard to track changes to fact check status. Fact checker links can be collected automatically by integrating with existing APIs and much more.

Being a part of this hackathon was a lot of fun and I am definitely going to join more of these in the future. I hope you like what I built here, thanks for reading!

Edit on May 4, 2020

The Poynter Institute’s International Fact-Checking Network has launched a chatbot on Whatsapp doing something similar.

Additional Resources/Info

Discussion (4)

alexlsalt profile image
Alex Morton

This is an awesome idea! I'm currently setting my app up with Firebase before add Twilio functionality -- really love how well everything works together :)

cddelta profile image
CDDelta Author

Thanks Alex! Firebase is awesome!

madebygps profile image
Gwyneth Peña S.

This is a cool idea! I can see this being very useful.

cddelta profile image
CDDelta Author

Thanks Gwyneth!

Forem Open with the Forem app