If you haven’t seen Yuval Noah Harari’s recent TED Talk on the allure of fascism — and why now, more than ever, it’s a real threat to democracy — it’s worth watching. An author and historian, Harari argues that “enemies of liberal democracy have a method. [They] hack our feelings of fear and hate and vanity and then use these feelings to polarize and destroy democracy from within.” It’s then that we turn to demagogues, who promise simple answers and the illusion of belonging to something beautiful.

Technology, Harari emphasizes, is the enabler. Increasingly sophisticated algorithms capable of predicting decisions and manipulating emotions, plus centralized access to personal data, have the potential to transform democracy into “an emotional puppet show.” Anyone who’s been awake the last two years or so as we’ve been bombarded by headlines about fake news, Russian election interference, Cambridge Analytica and Brexit, to name a few topics, knows this is not some abstract theory. It’s already happening.

I’ve been thinking about this effect, as someone who believes democracy is clearly worth fighting for and someone who’s long been a champion of social media as a vehicle for human connection. And my thoughts came together on a trip this summer to our office in Rome, where I had a chance to walk through the ruins of the Roman Forum, once the beating heart of the birthplace of representative democracy.

For centuries, a system of checks and balances enabled Rome to thrive, with the power of rulers curbed by the Senate and people’s assemblies. Then, the balance slipped. Amid mounting social unease, the republic gave way to an empire, ruled by emperors with far-reaching powers, and Rome slowly slid into its long decline.

The danger of isolation

What lessons can we take from the fall of Rome’s democracy? How do we resist the deadly allure of fascism? What role has social media played in getting us to where we are today? And what role can it play in helping us move forward?

These are complex questions. But Harari points to one way forward — a critical “security patch” to keep our own minds and emotions safe from today’s hackers of hate and fear: “[It’s] the responsibility of all of us,” he explains, “to get to know our weaknesses and make sure that they do not become a weapon in the hands of the enemies of democracy.”

In my eyes, the weakness that, perhaps more than any other, stalks us right now is isolation. Thanks to technology, we are more connected than ever, but paradoxically we can also be more isolated. With so many media choices at our disposal, we’re able to tune out any that conflict with our worldview. Sometimes, as in the case with our social feeds, this happens without us even noticing. Based on what we “Like” and click on, we get more of the same. Over time, we end up in a “filter bubble,” insulated from insights that could enlighten or challenge our perspective.

This is a dangerous thing. Conversation and debate — even when difficult — are the only ways to close the gulf between differing views and find middle ground. It’s how good ideas become stronger and how faulty ideas are exposed to the light of day. In key respects, it’s the willingness to do precisely this, rather than close ourselves off in a protective bubble, that represents the best defense against the kind of fascism and populism that stalks us today.

Tapping social media for good

And here social media can play a critical role. Whatever its flaws, social media remains a remarkably open and decentralized means of communication. It’s in its DNA. I saw this myself in 2011, during the height of the Arab Spring. Authorities in Egypt had clamped down on Internet access, so protesters turned to Hootsuite, en masse, to access Twitter to share information.

That spirit endures. We see it in the quickening pace of social movements — the Occupy protests, the Women’s Marches, calls for gun reform, the impassioned response to hurtful immigration policies in the U.S. — facilitated in large part by the ability to organize on social media. These channels may be vulnerable to misuse, but they’re also a powerful outlet for free speech and creating authentic human connection.

This isn’t meant to gloss over the very real dangers that Hariri points out — of emotional manipulation, polarization, and misinformation. Clearly, there’s work to be done here to make social media more transparent and less prone to abuse.

Part of this work is technical — deep changes in how the leading social platforms serve us updates, some of which are already in progress. In recent months, Facebook and Twitter have released ad transparency tools to let users see who’s behind paid posts that show up in their feeds, including political ads. Facebook now works with a growing army of fact checkers to “downrank” posts that spread false information. Twitter has moved aggressively to rid its platform of malicious bots, as well as to curb cyberbullying.

But more changes are needed, including a broad rethinking of the algorithms that populate our news feeds so they lead to less isolation, fewer echo chambers, more diverse viewpoints, and genuine conversations.

Just as important, however, is a basic personal hack all of us can use to reduce isolation and polarization, both on social media and off: reserve a space for optimism. Demagogues thrive on fear — fear that the economy is crumbling, that enemies are at the gate, that the sky is falling, and that unless we take drastic measures we’re all doomed. We’re surrounded by this sentiment today (thanks, in no small part, to the instant availability of news on social media), so it’s easy to get wrapped up in it.

But our reality is often quite different. Across the world, people are living longer, healthier lives than ever before; that’s an empirical fact. Globally, there are fewer victims of murder, war, and genocide than in the past. Workers make more money and are injured less often. 137,000 people are lifted out of extreme poverty every single day.

These aren’t headlines you see in the news and they’re rarely cited by political figures. Fear and disorder are powerful motivators, after all, and effective sales tools. But we can choose to be smarter than that. The simple decision to reserve a space for optimism makes our differences less threatening and brings our commonalities into focus.

In the end, social media remains the most robust marketplace of ideas the world has even seen: ungated, infinitely rich, and with truly global reach. If we’re ever going to have the hard conversations that are so desperately needed — on inequality, the environment, and our collective future — then social media may just be best platform to make that happen.

Ryan Holmes is CEO at Hootsuite.