Political activists must watch what they say on the likes of Facebook and Twitter, sites which will become the "next big thing in law enforcement", a leading human rights lawyer has warned.

John Cooper QC said that police are monitoring key activists online and that officers and the courts are becoming increasingly savvy when it comes to social media. But, speaking to The Independent, he added that he also expected that to drive an increase in the number of criminals being brought to justice in the coming months.

"People involved in public protest should use social media to their strengths, like getting their message across. But they should not use them for things like discussing tactics. They might as well be having a tactical meeting with their opponents sitting in and listening.

"For example, if antifascist organisers were discussing their plans on social media, they can assume that a fascist organisation will be watching. Social media sites are the last place you want to post something like that," he said.

Mr Cooper QC's warning comes after a New York court ordered Twitter to hand over messages posted on the site by a demonstrator belonging to the Occupy Wall Street movement in America. Malcolm Harris, 23, is accused of disorderly conduct after he was arrested on Brooklyn Bridge during a protest last October.

After a lengthy legal fight, Twitter eventually complied with an order to hand over the tweets on 14 September. Prosecutors hope to use them to disprove the demonstrator's defence that police escorted the protesters on to the bridge before arresting them for allegedly blocking it.

Addressing the possibility of similar cases arising in the UK, Mr Cooper QC said: "The police are aware and are getting more aware of powers to force and compel platforms to reveal anonymous sites." He cited the case of Nicola Brookes, in which he succeeded in forcing Facebook to hand over details exposing the identity of an anonymous online bully.

Mr Cooper QC added: "activists are putting themselves at more risk. Police will be following key Twitter sites, not only those of the activists but also other interesting figures. They know how to use them to keep up with rioting and to find alleged rioters.

"In the same way they used to monitor mobile phones when they were trying to police impromptu raves, they are doing the same with Twitter and Facebook, as those who say too much on social media will find."

But some activists are trying to overcome that naivety. In London on Saturday, former members of the Occupy encampment outside St Paul's Cathedral - among others - were among the 130 people who meet technical experts for lessons on how to keep themselves safe online. The so-called "Cryptoparty" was part of a global movement to arm those who want to carry out protests online with the skills to maintain their anonymity.

Attendees at the event at the Google Campus in east London's Tech City were simply asked to bring a laptop and technology experts promised to teach them skills like encryption. The events were the brainchild of an Australian activist, who uses the online nickname Asher Wolf. She said: "The idea is to stay safe online and protect the privacy of personal communication.

She added that there were more secure forms of online communication than those commonly used and insisted that Cryptoparty was not a tutorial on how to hack but said that, once people have learned to maintain their online security, "what they choose to do in their private communications is their business".

While some argue that genuinely peaceful protesters can have little fear of arrest regardless of what they say online, Mr Cooper QC said: "It would be wrong to establish a general rule that private communications should be handed over to the police. The principle that the law enforcement agencies should establish relevance first should not be diluted."

The lead officer on digital media and engagement for the Association of Chief Police Officers Deputy Chief Constable Gordon Scobbie confirmed that police "monitor social media for potential issues" around protests but said they generally use them to engage with demonstrators, which he said was "key to the police service's approach to policing peaceful protests".

However, some have found themselves regularly the subject of unwanted police attention as a result of their attendance at demonstrations. In May, peaceful protester John Catt lost his legal fight to force police to delete information they hold on him on the National Extremism Database. Pictures of and references to him are held because of his links to protest groups.

But long-term activist Mr Catt argued that, since he has never been convicted of any crime, officers were not justified in recording the details. Lawyers for Mr Catt claimed that he is "logged and recorded wherever he goes" and that the surveillance at more than 55 protests had a "chilling effect" on people exercising the right to protest.

But Lord Justice Gross and Mr Justice Irwin sitting in the High Court refused to order police to remove references to him from the database, saying that recording his actions was a "predictable consequence" of regularly attending demonstrations.

And that ruling came around five months after it emerged that City of London Police included the Occupy London movement on a leaflet warning businesses in The City about terrorist threats. The CoLP dismissed the inclusion of the protest movement alongside the likes of al-Qa'ida as a clerical error.

But, Mr Cooper QC said, social media are "far too much of an important tool not to be used but they need used in a less naïve way".

He added: "When people are acting within their rights of public protest, which are important but often become the 'Cinderella right' because they are subservient to their siblings, they should be very careful indeed about what they post because I would suspect that key activists are being followed anonymously by law enforcement agencies.

"These social networks are all, in my opinion, forces for good; I am a great fan. But they are liable to abuse and misuse. And, not only are the police catching up, the courts are too. The Lord Chief Justice is very social media-aware and in fact allowed tweeting from court.

"It is right to say the criminal courts are social media friendly; the law is beginning to understand them. If people continue to use social media in a naïve way then legitimate individuals are probably going to give too much away."

While he supported the right of people exercising their rights to public protest without unnecessary disruption, Mr Cooper QC stressed that real criminality was a very different issue.

He said that an unambiguously positive effect of the police's increased interest in social media would be an increasing numbers of criminals being caught because of their indiscretions online. He said: "With social media, it is amazing how many people involved with crime seem to let themselves down with it.

"More and more, the police and defence teams analyse the Facebook accounts of witnesses they are trying to undermine. It is accepted in criminal law that remarks made on these which are inconsistent can be put to the witness as inconsistencies in evidence or as evidence of bad character."

DCC Scobbie agreed, saying: "The police service works hard to secure evidence from any source during the course of an investigation. Information which is openly and publically available on social media sites that links criminals to crimes and offences has been used to help secure successful prosecutions."

Mr Cooper QC added: "One of the big revelations in crime detection in recent decades was the Filofax; it was amazing how often serious, professional criminals would record the weights of drugs in their conspiracies in little graphs in the back of their Filofaxes.

"The police soon learned to seize the Filofax when they searched a house. Things move on and the next big thing was mobile phones; they were a revelation. With mobiles, not only do we have a whole industry in forensic phone analysis, we can also work out where people were using the phone by the mast locations.

He cited a past client who insisted he was not at the scene of a murder he was accused of committing but who - mobile records showed - had made a call while standing next to the bin the victim's body was later found in.

He said: "Police will use social media just as they used the Filofax and the mobile phone and why shouldn't they?"