In the shadowy world of online political campaigning uncovered this week, it was hard to know what was real and what was pure make-believe. Could online political consultants dig deep into our souls, using information gathered through social media, and use their knowledge to influence our voting behaviour?
Could they gauge our political mood by our food preferences, or whether we like a particular brand of motorcycle?
Facebook found itself plunged into controversy as news broke that a political consultancy that allegedly used highly dubious methods had harvested up to 50 million Facebook profiles of users.
By gathering information about the users, including their likes, Cambridge Analytica boasted that it could build elaborate psychological profiles that could be used to sway elections.
As a whistleblower employed to work on the project put it, they built models to exploit what they knew about the voters - and targeted their "inner demons".
By hoovering up as much personal information as possible, they could play on emotions and send voters the right political messages.
The colourful, upper-crust boss of Cambridge Analytica, Alexander Nix, described this approach to campaigning as a "secret sauce". But revelations on Channel 4 News about the skulduggery allegedly employed by the company - including promising to use "beautiful" Ukrainian women to entrap politicians and a panoply of other dirty tricks - led to Nix's suspension.
More significantly, it led to concerns about how Facebook handles the personal information it gathers and profits from. It is also likely to prompt questions about whether intrusive "micro-targeting" techniques of campaigning should be allowed in referenda and elections.
For many people, Facebook has become an indispensable (if occasionally annoying) way of keeping in touch with friends and family. But many of these users may not realise that Facebook is perhaps the most effective mass-surveillance tool ever invented, containing infinitely more personal information than the CIA or the KGB could ever dream of.
It is all free for users, but as at least one observer remarked this week, when you get a service free online, you become the product, there to be hawked to advertisers.
Cambridge Analytica claimed to be able to refine personal information gleaned from Facebook. Executives told an undercover reporter, posing as a fixer for a Sri Lankan politician, how they had worked in more than 200 elections across the world, including inn Nigeria, the Czech Republic, India and Argentina.
They said they used data from social media to play on voters' fears during campaigns and took credit for helping to elect Donald Trump.
One of the executives, Mark Turnbull, said: "Our job is to drop the bucket farther down the well than anybody else, to understand those really deep-seated, underlying fears and concerns."
There is nothing new about targeting specific groups of voters through ads on Facebook or other social media.
In 2012, Barack Obama used micro-targeting to send messages to potential voters by building up an elaborate database of supporters and their Facebook friends.
With the consent of supporters, they targeted social media friends, trying to persuade them to come out to vote.
Although their effectiveness is unknown, both sides in the upcoming abortion referendum campaign in the Republic are paying for promoted posts on Facebook, sometimes targeting specific groups.
Craig Dwyer, a social media manager, said: "Micro-targeting on social media is not a new phenomenon at all, but people have mostly seen it in ads for things like socks and flights. I think we are just becoming educated about its use in political campaigns."
The problem with these "targeted" ads is that they are unregulated and can be targeted at voters by campaign groups from outside the country.
If a campaign group puts up a traditional poster, or sends out a leaflet, during a campaign, they have to declare the source of the literature. But on some online ads, it is impossible to find out where they are coming from.
Jack Murray, chief executive of the public relations company Media HQ, says the ethical and moral questions of gathering private information become deeper when the data is gathered in different contexts and pieced together.
"People can give out personal information in one context and then give out other information in another. When you add it all together, it is like two and two equals five. Adding all this information together can reveal so much more about you. Piece by piece, Lego brick by Lego brick, they form a profile of you."
Some of the revelations about how Cambridge Analytica gathered information - revealed in the Observer and on Channel 4 this week - seemed like passages from a futuristic science fiction novel.
The data was originally collected by getting 257,000 people to sign up for a personality test through an app called This is Your Digital Life, built by Cambridge academic Aleksandr Kogan. Through Kogan's company, Global Science Research, in collaboration with Cambridge Analytica, hundreds of thousands of users were paid to take a personality test - and agreed to have their data collected for academic use.
More significantly, the app also successfully collected the information of the test-takers' Facebook friends, leading to the accumulation of personal information about 50 million US voters. Facebook said this week that the use of the information was unauthorised.
Responding to the crisis on Wednesday night in an interview with CNN, Facebook's founder, Mark Zuckerberg, acknowledged that the company had made mistakes and outlined how it had changed its policies to make sure that user data was protected.
"I wish that we had taken those steps earlier," Zuckerberg told CNN. "That ... is probably the biggest mistake that we made here."
On the face of it, the algorithm used by Cambridge Analytica to build psychological profiles seems like mumbo-jumbo, and many marketing specialists are sceptical about whether it really works.
According to the Observer - the newspaper which broke many of the details of the story - the algorithm trawls through the 'likes' of users to gather sensitive personal information about sexual orientation, race, gender, even intelligence and childhood trauma.
It is reported that just a few dozen likes can give an indication of which way a user will vote, reveal their gender and whether their partner is likely to be a man or woman.
Likes could even offer clues about whether their parents stayed together throughout their childhood and predict their vulnerability to substance abuse.
The profiling used by Cambridge Analytica and possibly other online micro-targeters seems to rely on psychological research carried out at Cambridge University into what Facebook likes reveal about a personality.
If a user expressed a like for curly fries, for example, then the researchers found there was a high chance that they had a high IQ.
High intelligence is also indicated by liking thunderstorms and the works of Mozart, while less intelligent people are said to like Harley-Davidson motorbikes and the Facebook group called I Love Being a Mom.
People from broken homes tend to like overtly emotional expressions, such as 'I'm sorry, I love you', according to the research.
It is one thing gathering up all this information. But political analysts may debate whether these personality tests are accurate and whether they can be translated easily into votes.
Do they work better than old-fashioned techniques, such as door-to-door canvasses, where candidates can respond to individual concern in person?
Donald Trump's campaign hired Cambridge Analytica in June 2016 and paid it more than $6.2m, according to US Federal Election Commission records.
On its website, Cambridge Analytica says it "provided the Donald J Trump for President campaign with the expertise and insights that helped win the White House".
Alexander Nix, the boss of Cambridge Analytica, made some extravagant boasts as he was filmed talking to the undercover reporter from Channel 4, including taking credit for the Trump campaign.
"We did all the research, all the data, all the analytics, all the targeting. We ran all the digital campaign, the television campaign and our data informed all the strategy," Nix said.
The company was filmed claiming that, as well as sending out positive messages about Trump, it could use proxies to send out negative material on rivals.
"We just put information into the bloodstream of the internet and then watch it grow," one executive boasted. "And so this stuff infiltrates the online community and expands, but with no branding, so it's unattributable, untrackable."
According to some accounts, the marketing gurus from Cambridge Analytica exaggerated their role in Trump's success as they sought other business around the world.
Brad Parscale, who ran Trump's digital ad operation in 2016, said in interviews that Cambridge Analytica played a minor role in the campaign.
Jack Murray, of Media HQ, says: "It is almost immaterial whether this kind of campaigning actually works or not.
"We should still be concerned that there are people out there harvesting huge tranches of data and putting together jigsaws on every voter."
The controversy has not only raised the issue of the dark arts of political campaigning. Data security specialist Daragh O'Brien believes it could cause a shift in attitude to the social media world.
"People are asking piercing questions about the information society we want to live in," he stresses.
"Facebook has seen people as a means to an end - to create a phenomenally powerful advertising engine.
"People are rightly asking, 'Is that what we want?'"