If you've ever found that 20 minutes on Facebook leaves you with a lingering sense of failure and envy then take comfort from the fact that you're not alone.

Twenty per cent of people say that the last time they felt jealous was looking at a social networking site. In fact, according to German researchers, 'Facebook Envy' could be a threat to our happiness as well as to the longterm sustainability of the social network itself.

The research, by scientists at Darmstadt Technical University and the Humboldt University in Berlin, says that holiday photos are the biggest cause of envy, followed by jealousy over how many 'likes' or comments other people are getting.

Women are most likely to feel envious of physical attractiveness, the researchers found, while people in their mid-30s are most likely to envy family happiness.

In other words, Facebook makes us feel like our friends have more time off than we do, more money to spend on better holidays and are generally better looking and more popular.

Many of us respond to this feeling of misery by posting more fervent updates about how wonderful own own lives are, in an attempt, perhaps, to convince ourselves as much as anyone else.

Men, say researchers, tend to post more about their accomplishments, while women draw attention to their good looks and active social lives. Get this right and you can make your friends feel as miserable as you do.

The result is a "self promotion-envy cycle", say the researchers, which is so bad that a third of people say they feel that their "general dissatisfaction" with life has increased after visiting a social networking site.

This isn't something that's being caused by social networking. We naturally compare ourselves to other people - it's one of the ways we estimate how we are doing in life - and a site like Facebook simply increases our opportunities to do so and concentrates them into one 20-minute shot.

But our view is distorted. The envy cycle encourages people to post only the good things that have happened to them and to omit the bad, which means we don't get a genuine picture of what our friends' lives are like. That's made worse by the fact that we already tend to assume other people are happier than we are.

A 2010 study by Stanford University found that 40 per cent of the time we deliberately hide our negative feelings. However, we don't realise that everyone else is doing the same thing. Participants in the Stanford study overestimated how often their peers felt good and underestimated how often they felt bad.

At least part of this comes from our natural tendency to try to avoid making everyone miserable by complaining about our troubles. However, it seems that if we did that more often then social networks might actually make us happier.

Almost everyone knows a handful of people who like to share every misfortune. We usually avoid them but, if the German research is right, you should seek these people out. Tell Facebook you want more of their updates and not less. Mute the friends who are always jetsetting and getting promotions.

What you need is to visit Facebook and discover that half of your friends are ill, several of them have just been vomited on by their pets or their children and a surprisingly large number are freezing because their boiler has clapped out. You would, of course, be sympathetic but you would log off with a small smile and the knowledge that your life isn't that bad after all.