Earlier this year, God gave me the gift of insomnia. At the time, I did not realize what a blessing it was.

As a result, I may find myself unable to sleep at 2, 3 or 4 a.m. I reach for one of the books on my nightstand, and it is there that the gift of wakefulness is revealed: What I read often inspires me for a homily or blog post that I have been trying to write.

So it was on a recent Sunday at 4 a.m. when I picked up “The Reckless Way of Love: Notes on Following Jesus,” a selection of writings by Dorothy Day, the founder of the Catholic Worker movement.

I had been lying in bed, thinking about the language we find on social media. Several hours earlier, I had read the Facebook posts of people who were responding to the actions of political opponents with sentiments like, “I wanted to punch them in the face.” Unfortunately, such reactions are increasing on social media.

As I turned to Day’s writings, I read, “Love must be tried and tested and proved.” Suddenly, I realized that all of us are being tried and tested and given the opportunity to prove our love.

Both love and civility are hallmarks of a Christian life, even if one might not know that from the public discourse of our time. Too often, this exchange seems infected by a dislike and bitterness more suitable to lifelong enemies than to people with whom we share a common civic heritage.

Such disagreeableness may be one of the reasons that Bishop Thomas Tobin of the Diocese of Providence, R.I., recently deleted his Twitter account, calling it an obstacle to his spiritual life and an “occasion of sin.” My approach is different. After reading Dorothy Day, I now look at social media as an “occasion of love.”

Day writes that God “is giving us a chance to prove our faith, our hope, our charity.” On social media, too many of us fail to do so. Instead, we demonstrate our anger and our fears. We are so convinced of our own righteousness that we fail to appreciate the views of others; we have raised the possibility of being in error to the sin of being immoral.

It is easy to strike back at those who challenge us, to unfriend them or troll them. Yet the Christian response is to love them. In a very public way, we can do that on social media. Not only can we be civil to others but, when they are attacked, we can defend their integrity and humanity, even while we disagree with their politics. We can remain their friends even if we are political opponents.

As Dorothy Day wrote, “I cannot worry much about your sins and miseries when I have so many of my own. I can only love you all, poor fellow travelers, fellow sufferers. I do not want to add one straw to the burden you already carry.”

I have sometimes failed in this. I continue to face the challenges of social media with the desire to be loving to all. As I do, I will try to remember Day’s words: “If we love enough, we are going to light that fire in the hearts of others. And it is love that will burn out the sins and hatreds that sadden us.”

(Deacon Ayres is director of Catholic Charities’ Commission on Peace and Justice for the Albany Diocese.)