Doctors have been warned not to make friends with their patients on social networking sites.

The British Medical Association issued advice urging medics and students not to blur the boundaries with people they are treating or have treated in the past, for example by accepting a Facebook friendship request.

It warned that doctors and medical students who use sites such as Facebook and Twitter carelessly could be “risking their privacy, damaging their professionalism and risking the doctor-patient relationship”.

The guidance says: “Given the greater accessibility of personal information, entering into informal relationships with patients on sites like Facebook can increase the likelihood of inappropriate boundary transgressions, particularly where previously there existed only a professional relationship between a doctor and patient.

“Difficult ethical issues can arise if, for example, doctors become party to information about their patients that is not disclosed as part of a clinical consultation.

“The BMA recommends that doctors and medical students who receive friend requests from current or former patients should politely refuse and explain to the patient the reasons why it would be inappropriate for them to accept the request.”

Key points made in the advice include taking steps to keep personal information private, while being aware that this is not always possible on the internet.

The rules remind doctors that it is “inappropriate to post informal, personal or derogatory comments about patients or colleagues on public internet forums”.

Chairman of the BMA’s medical ethics committee Dr Tony Calland said: “Social media presents doctors and medical students with opportunities, as well as challenges. The BMA guidance is important as it provides doctors with the tools to prevent potential social media pitfalls.

“Medical professionals should be wary of who could access their personal material online, how widely it could be shared and how it could be perceived by their patients and colleagues.”

Research cited by the BMA suggests that a minority of doctors would consider linking with patients via social media, and some already had.

Students have also been warned to consider their future professional career when using social networking sites.

The BMA guidance included the example of staff at the Great Western Hospital in Wiltshire, who posted pictures of themselves on Facebook as part of the lying down game in 2009.

The photos showed members of staff lying on resuscitation trolleys, ward floors and the ambulance helipad, which broke hospital regulations.

Seven members of staff were suspended.