US President Barack Obama has warned young people about revealing personal information on social networking sites.

Reuters reports that Obama was taking part in a question-and-answer session with a group of 14 and 15-year-old school students, and was asked by one pupil for some advice on becoming US president.

He responded by saying: “Well, let me give you some very practical tips. First of all, I want everybody here to be careful about what you post on Facebook, because in the YouTube age, whatever you do, it will be pulled up again later somewhere in your life.

“And when you're young, you make mistakes and you do some stupid stuff. And I've been hearing a lot about young people who - you know, they're posting stuff on Facebook, and then suddenly they go apply for a job and somebody has done a search.”

A survey in June by found that 45 per cent of employers used social network sites to research job candidates and that Facebook, which says it has 250 million users worldwide, was their site of choice.

Some 35 per cent of the employers surveyed said they had found content on the sites that had influenced them to reject a candidate. Examples included inappropriate photographs, information about the applicants' drinking or drug use, or bad mouthing of previous employers, co-workers or clients.

Obama referred several times to ‘mistakes' he had made when he was at school, but offered no specifics. He has previously admitted to drug use when he was younger.