The average person now touches their phone screen more than 2500 times a day. Phone / 123rf
A leading addiction expert tells Laurence Dodds and Charles Hymas of the Daily Telegraph, the tricks social media companies learned from the gambling industry
Hacking a computer is about finding vulnerabilities. You look for loopholes and you find a way to exploit them.
Hacking a human, it turns out, is not so different - and, during the past two decades, technology companies have learned to play you like a fiddle.
According to Dr Mark Griffiths, Britain's leading addiction expert, social media firms such as Facebook and Snapchat have developed an arsenal of techniques to keep us glued to their products.
He has identified seven "hooks", drawn from 31 years of studying the gambling and online gaming industry, that drive "habitual use" - not addiction in the clinical sense, but frequent enough that other parts of your life may suffer.
"I don't think Facebook or Instagram are deliberately trying to get people addicted," says Dr Griffiths, "but what they do is maximise the time that people are on their network, because that relates to the advertising they can raise."
No wonder the average person now touches their phone screen more than 2500 times a day.
Not all time spent online is time wasted - but if you find yourself tapping and scrolling when you should be working or relaxing, you might want to watch out for these techniques that are designed to make your smartphone unputdownable.
In a 1968 study of gambling habits, people who had already bet on a horse were much more likely to rate it as a winner than those who had not yet parted with their money.
This "sunk-cost bias" leads us to justify decisions we have already made, even if we unconsciously regret them.
That's why social media sites want you to build a profile that grows as you post: the more time and effort we invest, the harder we will find it to consider the idea that we might be wasting our time.
This sense of investment is well-exploited in mobile games, which offer micro-rewards for logging in every day.
Recently, Snapchat added a similar feature called "streaks".
If you and a friend both send a picture to each other every 24 hours for three consecutive days, you start a streak; and for every day you keep going, the number increases.
If you're close to losing it, a little egg timer appears as a warning.
Snapchat denies its aim is to make its platform more compulsive, but the effect is to create a daily routine that becomes a habit.
Imagine you're in Las Vegas playing a slot machine. You're down to your last few dollars but you just keep going.
Every time you pull the lever, you don't know what you'll get - and every time you think: this time, I'll win.
Psychologists call this an "intermittent reward schedule" and it's one of the most basic and powerful addiction techniques we know of.
It's unreliable enough to keep you guessing, but rewarding enough to keep you hoping.
Now look to your smartphone. That motion you make when you drag your thumb down the screen to refresh a feed?
It's similar to pulling the lever on a slot machine: you never know what will come up, and only some of it will be enjoyable, but you keep going in search of the next reward.
Loren Brichter, the 33-year-old software developer who came up with the "pull-to-refresh" gesture, has since admitted regretting ever inventing it, saying he has spent "many months and years" thinking about whether it benefits humanity.
3. Social affirmation
All of us want to feel loved, and social media gives us a way.
Facebook, Instagram, Twitter and the like are full of mechanisms by which we can receive validation and approval from others when we check our notifications (more intermittent rewards).
The problem comes when we start to judge ourselves by the tokens we receive or modify our opinions according to what we can see is popular.
Many people are reluctant to give a post their "thumbs up" if they can see nobody else has done so.
The ultimate expression of online affirmation is the Facebook "like" button.
When Justin Rosenstein first built it in 2007 - originally called "the awesome button" - he wanted to create a "path of least resistance" to express positivity to your friends.
It worked: engagement soared, and Facebook gained a new stream of data about its users' preferences.
But now Rosenstein condemns "likes" as "bright dings of pseudo-pleasure" that have helped create "a problem at a civilisation scale".
He has banned himself from Snapchat, which he compares to heroin, while Leah Pearlman, his former colleague, has converted to Buddhism and employs someone else to monitor her feeds.
The fear of missing out (or "fomo" for short) is a common reason for overindulging in social media.
It is associated with greater engagement with social networking, lower life satisfaction and even with dangerous usage (such as while driving).
"I've got three 'screenagers'," says Dr Griffiths, "and when we go on holiday without wi-fi, they climb the walls because they don't know what's going on."
To prevent fomo (or perhaps to capitalise upon it), many social media sites now regularly prod users with "see what you've missed" messages.
The effect is to constantly bring you back into the network when you're not paying attention, reminding you that interesting conversations are going on behind your back, and that, maybe, if you said the right things, you too could be this popular...
Apple and Google have now promised "digital well-being" tools that let you block, delay or group your notifications for later consumption.
6. Reciprocity
You scratch my back, I scratch yours... reciprocity is one of the most basic rules of human behaviour, and social media fully exploits it.
When someone else likes or follows us we are more likely to return the favour, and may even feel obligated to do so - which is why apps are always sure to tell us when friends have interacted with our posts.
This principle reached its nervous peak with the invention of read receipts - dreaded little notes on messaging apps that say something like: "Your friend read this message at 17.35."
By snitching on you to the sender the moment that you open a message, they force you to respond as quickly as you can, for fear of insulting the other person.
Yet they create such anxiety that in a survey of Danish students, 82 per cent said they routinely left messages deliberately unopened so as not to trigger a receipt.
7. Competition
H L Mencken, the American satirist, defined wealth as "any income at least $100 more a year than the income of one's wife's sister's husband".
Studies tend to agree that we are naturally competitive.
Any social media site that gives us a number or a rating by which to judge ourselves also compels some of us to compete for the highest rating.
The most common such score is, of course, the follower count; just imagine using Twitter or Instagram without knowing how much more or less popular you are than everyone else.
Dr Griffiths' research has also found that frequent selfie-takers say they "feel lost" when their friends' online follower count exceeds their own - and that social competition is one of the main reasons that some people take selfies at all.