Police officers have been warned not to tweet while naked, drunk or eating doughnuts. Some boys in blue have failed to show such good judgement online in the past, with UK officers revealed to have committed such offences as making racist or homophobic comments or posing with weapons. Nearly one in 10 such misjudgements proved to be career-ending.

Freedom of Information requests have revealed 828 cases of social media and online-related incidents in England and Wales, taking place between 2009 and February this year. Breaches of online and social media rules include racist or abusive postings, remarks about senior officers, or being spotted in "compromising positions".

Most cases were resolved with advice given to the officer in question, while 14 percent required no action and 9 per cent resulted in the officer resigning, retiring or being dismissed.

With 88 incidents reported, Greater Manchester had the highest amount of social media-related incidents, followed by West Midlands and London's Metropolitan police. Essex, Hampshire, Merseyside, and Staffordshire kept their figures under their helmets.

Official social media guidelines issued by the UK's Association of Chief Police Officers (ACPO) suggest officers and staff shouldn't use social media when they're off-duty and when they've been drinking. But the guidelines are designed to prevent more damage than just the embarrassing viral potential of police officers spotted eating doughnuts (a foodstuff specifically identified by Suffolk police).

The rules also warn of the danger of criminals searching out a police officer's personal information "with a view to embarrassing, discrediting, harassing, corrupting or blackmailing them or their families for their own benefit" -- which is just an extension of the advice for police officers to be ex-directory (unlisted in the phone book) and hidden from the electoral role.

Aside from personal use, social media is increasingly used by UK police to offer transparency, with initiatives such as tweeting every 999 call or every court case to show the -- often surprising -- problems and requests that really take up an officer's time. When communicating with the public, officers are advised to use plain language, avoiding txt-speak or police jargon. They're also told to ignore trolls.

Oh, and Starsky? When you're undercover, it's suggested, you should turn off the location settings on your phone.

Social media has become a new beat for bobbies to patrol, with one senior office recently telling the BBC that social media-related complaints made up "at least half" of calls to British police. The offences -- bullying, threats, harassment -- are nothing new, but officers are still adapting to the new technology.