Barack Obama’s 2012 campaign, for instance, used one of Facebook’s APIs (application programming interfaces) and data to target voters. It’s clever and complicated, but what it boils down to is that Obama’s data scientists were able to persuade about a million Facebook users to connect their profile to the Obama campaign website. They were then able to access the profiles of these people, which also showed who their friends were. From this they were able to construct real life social networks, which enabled them to target many, many more potential Obama voters. “If you log in with Facebook, now the campaign has connected you to all your relationships,’ boasted a digital campaign organiser.

Facebook shut down that particular API function in 2014, apparently for privacy reasons – although sceptics point out that they realised outside companies could use Facebook’s API to replicate the ‘social graph’ that Facebook makes all its advertising money from.

What Cambridge Analytica did, in essence, was the same as the Obama campaign in 2012 – though they had a smaller sample group of 250,000 to model from.