Facebook has been trying to challenge search warrants issued by New York prosecutors back in 2013 who were seeking information on social security fraudsters, but has been told by a US appeals court that it has to comply.

The New York State Court of Appeals ruled on 21 July that Facebook had no grounds to challenge warrants for private messages, photos and other account information relating to 381 users.

The Manhattan District Attorney's office has admitted to Reuters that information handed over by Facebook has led prosecutors to secure almost $25m (£16m, €23m) in funds from people who were found guilty of benefits fraud.

A spokesperson for Facebook has said that the social network disagreed with the decision and is considering a new appeal.

A two-year-long battle

The warrants were originally issued by the Manhattan District Attorney's office in 2013 seeking information on dozens of individuals who had committed social security benefits fraud, including firefighters and policemen who allegedly feigned sickness in the wake of the September 11 attacks in 2001.

Facebook tried to fight against the warrants, citing that it violated their users' Fourth Amendment rights, but when that argument was thrown out by the court, the social network complied and handed over the information, while pursuing a separate appeal.

However, the court ruled that only the defendants involved in criminal cases would be allowed to suppress any evidence produced from looking at private details on their social media profiles.

But could this happen in the UK?

"In the UK, for an investigation in relation to fraud, the police would ask for the social media network to provide the information voluntarily, but I wouldn't advise the social network to hand over information without the police getting a warrant," Ian De Freitas, partner at international civil and commercial law firm Berwin Leighton Paisner, told IBTimes UK.

"When the judge issues the warrant, the social network has seven days to challenge it in court. Theoretically, the individuals could do something about it, but the police don't want the individuals to know as they might be tipped off that they're being investigated.

"So the social network might be precluded from letting the individual know, although the social network could push back."

At the moment, De Freitas says it is already very common for the police to issue warrants to access information that is held privately for criminal investigations, so there is no reason why law enforcement could not request private Facebook user data in benefit fraud cases.

A spokesperson for the Department for Work and Pensions told IBTimes UK: "Our fraud investigators use a comprehensive range of methods to track down people who are wrongly claiming benefits.

"Whenever we receive information which conflicts with that provided by a claimant, this material is used to support prosecutions."

DWP does use digital methods but would not confirm or deny if it looks at social media networks. It did however confirm that job centres have access to real-time earnings data from the HMRC.

Right to investigate trumps privacy rights

Although UK citizens have a reasonable expectation and right to privacy, when this is weighed up against the state's right to investigate fraud, the court will usually find in favour of law enforcement, except in situations of fishing expeditions.

"Sometimes law enforcement will go fishing, trying to find out something by broadly searching through information. People like the civil liberties trust Liberty challenge fishing expeditions like this, going to court and saying they think it is unlawful," added De Freitas.

"The court will hear the case, but sometimes they want one or two people whose data has been investigated to be claimants."

Double-check your privacy settings

So other than not committing crimes, the best thing for people to do is to make sure that they are properly locking down their social media networks, as in many situations law enforcement finds things out by searching Facebook and Google just like your average Joe.

"We would never breach a Facebook account, but you'd be amazed how much information about a person is available publicly on Facebook," Phil Beckett, partner at corporate forensic investigation and e-disclosure firm Proven Legal Technologies, told IBTimes UK.

"The sort of information left unlocked could be photos and comments you write on other people's walls and statuses. You can go to profiles of the younger generation and their Facebook accounts are often totally open."

Beckett added that people who commit crimes rarely use their corporate business email, and most incriminating communications take place through free webmail services or social media networks.

Ongoing rows amongst lawmakers and tech firms

Facebook's appeal was supported by several Silicon Valley tech companies including Microsoft and Google, which fear a worrying precedent being set that would allow law enforcement agencies to easily access all sorts of private digital data.

Meanwhile, Microsoft is also fighting an ongoing battle of its own – US law enforcement wants Microsoft to hand over emails that are stored in a data centre in Ireland for a drug trafficking investigation, and Microsoft is appealing against the demand after refusing to comply.

Ireland isn't keen to allow the US to infringe its sovereign rights, and the European Union wants to make sure that other countries can't make similar demands, but this could lead companies that have a base in the US to being sanctioned by the US government.