In the 24 hours that followed Donald Trump's surprise victory in the US presidential election on November 8, 2016, a data scientist monitoring global social media counted nearly eight million English-language exclamations of the word "fuck."

It’s a telling anecdote from LikeWar, the forthcoming book on the weaponization of social media by co-authors P.W. Singer and Emerson Brooking. Trump's election, they write, was indeed a "shock to the political system." But as Singer, a strategist at the Washington, DC-based think tank New America, and Brooking, a former researcher for the Council on Foreign Relations, go on to explain, Trump's unlikely rise to the White House was symptomatic of social, political, and technological trends decades in the making—trends that gave rise to the internet and social media and which, in turn, transformed the way we control, spy on, and kill each other.

"This is not a book about the Trump presidency," Singer and Brooking write, by way of introduction. "Instead, this is a book about how a new kind of communications became a new kind of war."

The broad strokes go like this: In 1968, two psychologists wrote a paper theorizing that computers could become communications devices. The US Department of Defense ran with the idea, and in 1969 the precursor of the internet as we know it today, the military-operated ARPANET, went live. The National Science Foundation took over in the 1980s before business began to dominate in the 90s, at which point, things started to grow in exponential leaps. There were 28,000 internet users in 1987, according to Singer and Brooking. Today, there are billions.

In 2001, Wikipedia launched. Mark Zuckerberg founded The Facebook in 2004, Twitter followed in 2006, and Apple introduced the internet-capable iPhone in 2007. And on May 4, 2009, in a last-ditch attempt to save his own flagging reality television show (by asking viewers to watch his appearance on Late Night with David Letterman), Donald Trump tweeted for the first time.

Trump's first tweet. Image: Twitter

Two years later, "something changed," Singer and Brooking write. As Trump began tweeting more often, the content of his posts became more politicized and loose with the truth. They also gained increasingly amounts of attention, to the point Trump's social presence, which underpinned his presidential bid starting in 2015, would go on to earn him the equivalent of $5 billion in free advertising, Singer and Brooking estimate.

Trump had the help, furthermore, of click farms in the Philippines, purveyors of entirely made-up "fake news" in America, the now-defunct data-mining firm Cambridge Analytica, and internet-savvy Russian agents posing as American voters on Facebook and Twitter, as well as online trolls who gathered on 4chan and r/the_donald. Trump has kept up his tweeting as president, using social media to mobilize a small yet fiercely loyal base. His posts, in turn, continue to upend US alliances and political norms, amplify white nationalist conspiracy theories, and intimidate the press, and have even alluded to the nuclear annihilation of North Korea.

Trump’s digital strategy, Singer and Brooking argue, is not unlike militant groups and street gangs that leverage the viral web to tell a compelling story about policy, religious dogma, or their own perceived fearsomeness, all in an engaging voice, while repeatedly targeting exactly the right audience to trigger a dopamine response or sheer terror, both online and IRL.

"To 'win' the internet, one must learn how to fuse these elements of narrative, authenticity, community, and inundation," Singer and Brooking write. "And if you can 'win' the internet, you can win silly feuds, elections, and deadly serious battles."

Image: Eamon Dolan/Houghton Mifflin Harcourt

Trump lies at the heart of LikeWar, but that wasn't always the plan. Singer told me he and Brooking began brainstorming the book in 2014 when Islamic State forces captured the Iraqi city of Mosul. "It created this moment of not just disruption for war and politics, but confusion," Singer said. "Who was this group and how did they just pull off what had seemed the impossible, beating a military much larger than them, trained and armed by the most powerful nation in the world?"

"What stood out was the social media element," Singer continued. "A major part of how ISIS had risen and then triumphed was by using the very same tactics that celebrities, marketers, and teens were using in their own online battles."

Trump's election, in other words, "basically validated the track we were on," Singer added, "but then scared us into going even bigger."

LikeWar is an engaging and startling work. To the extent social media is now so deeply ingrained in our everyday lives, the book illustrates how it would seem the likes of Twitter and Facebook are unlikely to become any less weaponized. "Politics has taken on elements of information warfare," the authors write, "while violent conflict is increasingly influenced by the tug-of-war for online opinion."

"What we click on, what we 'like' helps give attention to one side or another," Singer added. "As we've seen in everything from elections to wars, attention can yield power."

There is a light of cautious optimism at the end of the tunnel, if we want it. In this way, LikeWar spotlights a number of lesser-known individuals whose efforts in the battle for truth are deserving of attention, from internet journalists who use social media to track war crimes to a Muslim-American woman who uses the same platforms as ISIS, only to recruit online volunteers to fight against extremism.