Whatever troubles Jeremy Corbyn might have elsewhere, there is one place where he is unambiguously winning: Facebook. His personal page has more than 770,000 “Likes” and even more users will see its content shared by friends, or suggested underneath other articles. In a space where attention is currency, this is a huge achievement. In the week that Theresa May became Prime Minister, Corbyn’s Facebook page reached a third of all UK internet users, according to a source inside Labour’s digital team.

The amplifying – and so potentially distorting – effect of Facebook on public discourse is poorly understood, but it cannot be ignored. The social networking site’s influence, size and revenue are unmatched: while Twitter has 310 million monthly active users, Facebook has 1.65 billion. Two-thirds of Britons use it every month.

The media are waking up to the reality that Facebook is both a conduit for their stories and a rival for their money. Politicians face a similar challenge but their trade-off is this: they get a direct connection to activists and supporters but with the risk of creating insular, self-reinforcing communities. (On the Jeremy Corbyn Facebook page, no one can hear you scream “unelectable”.)

We talk about the “Westminster bubble” but we should talk about the “Facebook bubble”, too. Most of us make friends who are like us in background and political leanings. Facebook’s algorithms give us more of what we have already shown we like. This creates increasingly polarised communities without us even noticing. Unlike when you walk into a petrol station and see the Sun next to the Guardian, on the internet it’s easy to forget that other opinions are possible.

There is another problem that is shared by news media and political parties. “Online, people like people,” is how one campaigner put it to me. Just as star columnists command big money, we have seen a wave of politicians (including Donald Trump and Bernie Sanders in the US) whose personal followings cannot be neatly merged with existing members who believe that “the party” transcends any particular leader. “Bernie has blood on his hands,” read a typical comment on one Sanders Facebook page after the senator backed Hillary Clinton.

Thanks to Facebook and the campaign group Momentum, personal supporters of Corbyn have flooded into Labour. His Facebook page has 250,000 more Likes than the Labour Party page, which recently passed the half-million mark. (Angela Eagle’s page has around 18,900 and Owen Smith’s 6,600.) It is a measure of Corbyn’s online success that only 51 per cent of those who were full members at the last election think he is doing a good job. However, he has reshaped the party in his own image, and it now has a pro-Corbyn majority.

How parties deal with this personal style of politics is anyone’s guess. The Tories perhaps do it best: by selecting only two leadership candidates to go to the membership, they ensure that direct democracy is tempered by the parliamentary party.

The “Facebookification” of politics is not all negative. An engaged local MP can create a page for his or her constituency that can bring together thousands of citizens who care passionately about the area. Using online media also helps parties to connect with voters once considered hard to reach, such as young people and those living outside cities. Yet there are downsides, which are scarier because they are largely invisible. The ethnic targeting of adverts that we saw in the London mayoral campaign is easier online, where social networks know almost everything about you. For example, it would be possible to target an anti-immigration message at those in majority-white areas.

Then there is what the behavioural economist Cass Sunstein calls “group polarisation theory”. In closed communities, the louder, more extreme voices dominate; moderates leave; those who remain fall into step with the prevailing direction. That’s how you end up with unofficial Corbyn-supporting pages on which words such as “Zio” (short for “Zionist” and proscribed by Shami Chakrabarti’s review into anti-Semitism in the party) are bandied about, or forums on which suggesting any potential accommodation with the wider electorate on welfare or immigration will have you labelled a “Blairite”, “Tory-lite” or, simply, “traitor”.

Wrapped in with this is a hatred and suspicion of the mainstream media, or “MSM”. Just as Boris Johnson, an Old Etonian, led a revolt against “the elites” during the referendum campaign, so many online media organisations prosper by promising to reveal “what the media won’t tell you”.

There are independent left-wing sites such as the Canary that are as briskly biased in favour of Corbyn as the Sun is biased against him, and get almost all of their traffic from Facebook. Quite often, I find that I am bombarded with the same attack line or conspiracy theory – that “Blairites” didn’t oppose George Osborne’s welfare cuts, say, or that Angela Eagle staged an attack on her constituency office as a “false flag” – and find that it originated on a popular pro-Corbyn Facebook page.

There is no regulation of these spaces. The law cannot touch them and, for many, they are more trusted as a source of news than the “MSM”. They are encouraging an anti-elite, anti-expert, anti-media populist tone in politics. To begin to tackle this, we should acknowledge just how powerful Facebook has become. “Facebook has a responsibility to society beyond servicing shareholders, Wall Street and VC investors,” says Emily Bell, the director of the Tow Centre for Digital Journalism at Columbia University, New York. “Just as a water company has a duty not to poison the supply, so Facebook has a responsibility to use its significant distribution power for better democratic and civic outcomes.”

Update, 27 March: This article originally referred to Jeremy Corbyn losing if the leadership election had the same selectorate as last year. However, that's too strong a conclusion to draw from the YouGov data so I've amended it to reflect the broader point about weakening support from full members.