When he received the phone call from the leader of the far-right League party, Edoardo Della Barbara knew he had won an elaborate Facebook contest. It was February – in the midst of Italy’s general election campaign – and Della Barbara was the latest follower to like the most posts by Matteo Salvini in the shortest amount of time.

“I knew it was linked to building engagement through social media,” said Della Barbara, a 22-year-old university student from Milan.

The prize was a 10-minute one-on-one call with Salvini, which Della Barbara used to talk about his studies, his family’s business and his hope to see reduced taxes on electronic cigarettes. “It was interesting, as doing politics in this way had never been done in Italy before.”

Revealed: how Italy's populists used Facebook to win power Read more

“Who will win? Salvini will,” the party leader said in one Facebook video promoting the contest. “The others have newspapers, television, banks and corporate cash … we have you, we have the network … so long as it remains free.”

Salvini is not the only populist, on the left or right, to prove adept at innovating with social media. Silicon Valley has given politicians of all stripes the ability to bypass traditional media outlets, communicate directly with voters and sculpt their own image without interference from journalists.

Jair Bolsonaro, Brazil’s president-elect, benefited from viral WhatsApp messaging, while Facebook was turned into a weapon against opponents of the Philippines president, Rodrigo Duterte. And after reaching the White House on the back of a tweet-fuelled campaign, Donald Trump famously said: “Maybe I wouldn’t be here if it wasn’t for Twitter.”

But it is another nationalist, populist leader – India’s Narendra Modi – who has the largest combined following on Facebook, Twitter and Instagram of any politician in the world, at more than 100 million. The prime minister’s approach to social media contrasts sharply with Salvini’s homespun Facebook updates and Trump’s typo-ridden tweets.

Modi combines a steady stream of upbeat announcements with occasional, gentle jabs at his his opponents. It is a restrained approach that suits Modi, and has helped him rebrand his persona, from hardline nationalist to populist champion of India’s technologically connected middle-class.

Benjamin Moffitt, a senior lecturer at Australian Catholic University, said there was no uniform use of social media among populists. But there was a new generation of populist leaders who were using digital communication tools with “more skill and efficacy” than their rivals. “Their Twitter feeds, Facebook pages and so forth often have more shares, likes and fans than their opponents, and are often far more entertaining and engaging.”

Facebook Twitter Pinterest Narendra Modi greets attendees at an event ahead of the G20 summit in Buenos Aires. Photograph: Andres Martinez Casares/Reuters

‘You never see this on the TV news’

Salvini’s use of social media has intensified in the six months since he became deputy prime minister in June, a period in which his profile and popularity has steadily increased. That can be attributed in part to his use of Facebook and Instagram, which he uses to cultivate his public persona.

In one recent five-day period, Salvini’s Facebook page included a post defending crucifixes and nativity scenes as symbols of Italian culture, a live video in which he donned a hard hat onboard a digger that was about to demolish a villa in Rome owned by a mafia clan, and several selfies savouring “Italian only” products: a Nutella pancake, a tiramisu, and a pint of Moretti beer.

Play Video 1:33 How Matteo Salvini uses Facebook live streams to exploit immigration – video report

His Instagram account was similarly replete with selfies and other images depicting a down-to-earth Italian: cooking fried eggs (“an energetic lunch!”), eating a burger and rustling up chicken cutlets for his two children. He also posted photos of cats sent to him by supporters alongside the caption: “It’s good to have a few pussycats on the page to bring some tranquillity to an evening.” Apart from cats, there was Salvini on a horse, with a donkey and petting a budgie. There were also images of him posing bare-chested on a beach, jogging while wearing a police officer’s cap and holding a statue of the Madonna.

Mixed with the soft selfies, however, is a near-constant barrage of far-right propaganda, much of it directed at scapegoating immigrants. Salvini’s most popular video during the election campaign, according to a Guardian analysis of data acquired by academics at the University of Pisa, is a clip less than three minutes long. It shows two videos side-by-side: footage of elderly people rummaging through discarded bin bags for scraps of food, and another of African migrants complaining about the bad food they receive at a reception centre.

“This is what the left has reduced us to,” Salvini says in the post, “you never see this on the television news, who knows why.”

Facebook Twitter Pinterest Salvini takes a selfie with a donkey at an event in Rome’s Circus Maximus. Photograph: Andrew Medichini/AP

Salvini’s communication skills were first nurtured at La Padania, a now-closed newspaper that acted as press organ during the League’s days as a northern secessionist movement. He joined the paper, working on the letters page, in 1997, four years after his election as a councillor in Milan.

“I remember him going to the squares or markets, never missing an opportunity to hand out fliers,” said Stefania Piazzo, a former director of La Padania. But after becoming leader of the party in 2013, Salvini had the foresight to embrace the digital era, closing the party’s newspaper and diverting resources into an online news site, Il Populista.

These days, his highly choreographed social media operation is overseen by the strategist Luca Morisi, whose Sistema Intranet company created a mysterious piece of social media software known as “the Beast”. Morisi used an interview with YouTrend in October to dismiss rumours about the software, saying there was no “automated listening”, and that his boss’s success on social media was largely down to intuition.

Morisi, his business partner, Andrea Paganella, and four social media managers are official staff members of the interior ministry, costing taxpayers €314,000 a year. Together they produce a constant diet of social media content, much of it fuelling animosity toward migrants.

Constructing an image

Salvini’s appetite for controversy contrasts sharply with Modi’s avoidance of it. When a Muslim girl was murdered this year and eight Hindu men were charged with the crime, India convulsed with rage and recrimination. For days, both online and off, Modi said nothing about the case.

His more than 44 million Twitters followers saw only the Indian prime minister’s tribute to India’s Commonwealth Games athletes, his celebration of various festivals, cartoons of himself doing yoga and his plans to meet the Queen.

It was standard fare for Modi, whose office has a dedicated staff member who carefully coordinates the output from his personal and prime ministerial accounts. According to a 2015 freedom of information request, Modi handles his own Twitter account, @NarendraModi, indicating at least some of his tweets are personally penned on his secure tablet.

Facebook Twitter Pinterest Modi embraces Donald Trump, a fellow prolific tweeter, as he departs the White House after a visit last year. Photograph: Carlos Barria/Reuters

Joyojeet Pal, an associate professor in information technology at the University of Michigan, said Modi had used social media to soften his image, helping to offset concern India’s middle classes may have had about voting for a firebrand, socially conservative sectarian.

In the early 2000s, Modi was best known as the chief minister of Gujarat whose heated rhetoric inflamed tensions that resulted in mobs attacking Muslim homes and shops across Gujarat, killing at least 1,000 people. Online, however, another Modi has emerged.

One of the earliest adopters of technology among Indian legislators, Modi set up an official website in 2003 when many other party offices were still using typewriters, and joined Twitter in 2009. A Stanford University study published this year examining Modi’s tweets noticed their content evolved around January 2013, when he became the party’s frontrunner to contest national elections.

'Italians first': how the populist right became Italy's dominant force Read more

References to Hindu nationalist causes have became more muted. “Modi’s language and style … underplayed Hindutva [Hindu nationalism], turning instead to Hindu greetings, messages about places or artefacts of Hindu interest,” the researchers said.

To his Twitter audience of mostly young, urban Indians, clamouring for jobs in a competitive market, Modi emphasises his roots as an outsider and self-made man — someone who has risen up from a childhood as a chai-wallah (tea-seller) at train stations.

It draws a contrast with his main opponent, Rahul Gandhi, a scion of the Nehru-Gandhi dynasty who embodies the Indian establishment. “They looted the nation in the name of the poor but now it is the son of a poor man who is challenging them,” Modi tweeted during the 2014 election campaign.

Modi also began posting selfies, sporting an Apple Watch and using digital holograms to beam himself to rallies across India. In a country where millions of lives have been transformed by the IT revolution, the embrace of technology had a loud populist resonance, said Pal.

“In millennial India, we accept technology as the means to transformation,” he said. “The middle-class person gets a degree in technology and transforms their future … Why for instance would Modi have a well-maintained page on LinkedIn? Clearly it’s not what will get him his next job. The point is, it shows that he stands on his credentials, like every other Indian jobseeker.”

An active social media presence also gives Modi an excuse to bypass traditional media. He is the first prime minister in India’s history never to have given a press conference inside the country.

While Trump and Salvini take it upon themselves to stoke fiery messaging, Modi leaves that to allies. One former party activist, Sadhavi Khosla, claimed in a 2016 book she was part of a network of hundreds who would receive daily instructions from the party on whom to target.

“Our value is that since we are not official, we do not go through that much vetting,” said Vikas Pandey, a volunteer with Modi’s Bharatiya Janata party (BJP) and founder of “I Support Narendra Modi”, the most popular political fan page on Facebook, with more than 15 million followers. “We can be spicier than the official BJP accounts, which like any official account is more or less very boring.”