(CNN) -- Before the explosion of social media, Ken Altshuler, a divorce lawyer in Maine, dug up dirt on his client's spouses the old-fashioned way: with private investigators and subpoenas. Now the first place his team checks for evidence is Facebook.

Consider a recent story of a female client in her 30s, who came to Altshuler seeking a divorce from husband. She claimed her husband, an alcoholic, was drinking again. The husband denied it. It was her word against his word, Altshuler says, until a mutual friend of the couple stumbled across Facebook photos of the husband drinking beer at a party a few weeks earlier.

It was the kind of "gotcha moment" Altshuler knew would undermine the husband's credibility in court. His firm presented the photos to the judge, and the wife won the case in April, he said.

"Facebook is a great source of evidence," Altshuler said. "It's absolutely solid evidence because he's the author of it. How do you deny that you put that on?"

Social media stalking skills have become invaluable to the legal world for divorce cases in particular. Online photo albums, profile pages, wall comments, status updates and tweets have become gold mines for evidence and leads. Today, divorce and family law firms routinely cull information posted on social media sites -- the flirty exchanges with a paramour, unsavory self-revelations and compromising photographs -- to buttress their case.

Posting hugging and kissing photos online can show a happily married relationship, or it can expose a secretive affair. At least 80 percent of attorneys surveyed by the American Academy of Matrimonial Lawyers cited a growth in the number of cases that used social media over the last five years. The study was released earlier this year.

Divorce attorneys say social media sites have opened windows for infidelity because it's become easier to rekindle romance with an old flame or flirt with a stranger. And the posted, shared, and tagged evidence of infidelity is precisely the type of evidence attorneys look for online.

"You need to familiarize yourself with privacy settings to ensure there is no way personal information can be accessed," said Adam Ostrow, editor in chief of Mashable.com, a social media guide.

Facebook -- where attorneys find most of the evidence and leads -- has gradually relaxed privacy settings over the last year. Attorneys say that enabled some members' personal details to be leaked without the user realizing it, attorneys say. On May 26th, Facebook founder Mark Zuckerberg acknowledged the problem and, in a blog, announced new tools making it easier for users to tighten privacy settings and block outside parties from seeing personal information.

"It's becoming all but impossible to protect your information unless you spend hours and hours figuring it out," said Lee Rosen, a divorce attorney in North Carolina, who added he reaped the benefits of the tricky privacy controls in a recent case.

Rosen was investigating a North Carolina husband in his 40s accused of cheating on his wife. The husband failed to set privacy controls on his Facebook wall, an area where users can post information. Rosen noticed a suspicious message from the husband's younger female co-worker. The post was the hunch he needed to steer him in right direction.

Rosen reports about a quarter of his divorce cases use information found on social media sites.

Finding the Facebook profiles is so simple that Rosen says anyone could do it. He goes to a site called Flowtown.com, a site intended for marketers but is useful for attorneys, too. Type an e-mail address and the site generates various social media profiles. If that fails, Rosen hires a private investigator.

At National Digital Forensics, Inc., a North Carolina company that mines digital sites for information, requests for social media searches from divorce lawyers have surged, says president and senior digital investigator Giovanni Masucci. The social media detective work requires different snooping skills, he says.

"For example, someone may be cheating, but they are married," Masucci explained. "If their status on the web page says single, that's a major red flag."

Masucci estimated about half the social media cases they investigate expose some kind of cheating.

The happy reality for divorce attorneys is that most clients are bound to be on Facebook or another social media site. Facebook is more popular than ever, drawing in 400 million users, the company reports on its website. Each user creates an average of 70 pieces of content monthly and has an average of 130 friends.

The most common way to gather information on Facebook relies on the battling couple's mutual online friends who still have access to the spouse's profile. Many times the spouse will "de-friend" a partner but forget about their shared friends, who can play detective and access information on their profile.

Another way of exposing damaging information is searching the profiles of the suspected "other man" or "other woman", says says Marlene Eskind Moses, a divorce attorney in Tennessee.

"It's amazing how people tell their life stories," said Moses, who represented a Tennessee woman who believed her husband was cheating on her. After the wife found herself blocked from her husband's Facebook page, she found the profile page of the other woman whom she suspected in the affair.

On that woman's profile page, a public album of photos taken on a romantic getaway appeared. Scenic shots of South Carolina's mountains. Her husband and another woman embracing in front of an art gallery. Portraits of the couple with their faces nuzzled close together.

Elizabeth K. Englander, professor of psychology at Bridgewater State College in Massachusetts, says people divulge information on social media because they believe no one will ever see the information they post.

"The sense online is sort of like the mob effect," Englander said. "You feel like you're one in a million, and so who will ever notice you?"

But when someone does notice, that's when some divorce attorneys pounce. Information copied from social media sites can sway the outcome of alimony payment disputes and custody fights, attorneys say. Some parents have even lost a child because of the behavior they exhibited online, the lawyers say.

The ultimate goal, after all, is to catch a spouse in a lie. Sometimes it's a wife claiming she can't afford child support payments but subsequently purchased expensive jewelry and posted photos of the items on Facebook. Or if a husband who claims he doesn't have anger problems while his social media profile is loaded with expletives. Once there is evidence of a person caught in an obvious lie, attorneys say, it undermines the rest of their credibility with the judge.

Attorneys advise users of Facebook and other social media who are headed toward a divorce or custody battle to edit their profiles, be cautious about updating statuses and double check to see who is really a "friend."

Or to make things easier -- at least until the trial is over or a settlement is reached -- just get off Facebook completely.