As the results rolled in overnight, reaction came in fast online.

In partisan Facebook groups, the results were cheered or jeered - as you might expect - depending on which way the groups lean. This post in a large anti-Brexit group was typical:

Image copyright Facebook.

Meanwhile, in big pro-Brexit groups, there was an overall feeling of "job done" - and even a note of sadness at the end of the campaign:

Image copyright Facebook

And in Scotland, pro-independence groups were cheering the SNP's rising fortunes:

Image copyright Facebook

While these partisan groups are generally "echo chambers" where everyone largely agrees, groups focused on local areas tend to have more of a mix of voices giving rise to lively debates.

During the campaign we found many of these were left-leaning, with Labour supporters significantly more vocal than those who back the Tories.

Administrators and group members told us that "shy Tories" may be a reason. This phrase originally referred to the theory that Conservative supporters were less likely to tell opinion pollsters who they were voting for.

The online version we've found means that Tory supporters are sometimes less visible in local groups.

As Conservative voters tend to be older, they are less likely to be social media users in the first place, and those that use Facebook seem less likely to air their opinions.

However they did come out in force once the results became clear:

Image copyright Facebook

Image copyright Facebook

What were people talking about on Twitter?

Election-related hashtags dominated Twitter's list of top worldwide trends throughout the night, with several users pointing out the discrepancy between some of the most popular messages on the social network and the results ("shooketh" in the example below is slang for "extremely shocked"):

Image copyright Twitter

In the early hours of Friday, one surprising term made an appearance on the list of top UK Twitter trends: "Canada". The most popular tweets were from left-leaning voters declaring their intention to up sticks.

Image copyright Twitter

How things changed

The big online story during the 2017 general election was the influence of a huge network of pro-Labour websites, accounts and groups.

But changes to Facebook's algorithm - the code determining which posts get seen - have made it much harder for these sites to reach massive numbers of people.

And this time Jeremy Corbyn's online cheerleaders had more competition from popular pro-Brexit groups. Throughout the campaign, and particularly after the Brexit Party announced they would be standing down in Conservative-held seats, the chatter in those groups swung steadily in favour of Boris Johnson.

Meanwhile the left-wing and anti-Brexit groups and pages were divided on whether to vote tactically, and how to go about it - in lots of seats it was unclear which party was best placed to beat the Conservatives.

These divisions remained apparent even once polls had closed.

Image copyright Facebook

And recriminations continued throughout the night. For instance this post in a pro-Corbyn group celebrated the loss of Liberal Democrat leader Jo Swinson:

Image copyright Facebook

Beware the big numbers

A Labour press release the day before the election claimed that the party ran "the most successful election social media campaign the country has ever seen".

That may have been the case. Most of the top viral videos were pro-Labour. But that doesn't seem to have translated into more votes.

Social media users are not necessarily representative of the UK. Research suggests that users of Twitter, and to a lesser extent Facebook, skew young, left, and pro-EU, while older voters - who are more likely to vote Conservative - are less likely to be active on social media.

There will be more analysis in the coming days, but it's clear that we have yet another reason to look below the surface when it comes to politics online.

Reporting by Sean Allsop, Joey D'Urso, Marianna Spring and Mike Wendling.

Have you spotted something interesting on social media? Email us

Follow BBC Trending on Twitter @BBCtrending, and find us on Facebook. All our stories are at bbc.com/trending.