Parker's attorney, Joseph Kelly, said the two do not know each other except through the tenuous online connection of Facebook.
"They're not out having drinks together," he said. "It's social media. . . . They're elected officials. It's common."
He also defended Hayden as "a man of excellent integrity."
"I've been in front of him hundreds of times," Kelly said. "He works very hard and fair at dispensing justice."
But the attorney general's motion, filed Monday, said the Facebook friendship "both creates an appearance of impropriety and undermines public confidence in the judiciary."
The motion also noted that a Magisterial District Judge in Cumberland County recused himself from a case in October when his Facebook friendship with the defendant became public.
The Attorney General's Office is prosecuting the case because Philadelphia District Attorney Seth Williams recused his office. Williams and Parker are friends - in life and online.
Parker was pulled over on the night of April 30 by Officers Israel Miranda Jr. and Stephanie Allen, after they said they spotted her driving the wrong way on Haines Street in Germantown.
The officers said she smelled of alcohol, her eyes were glassy, and she had difficulty getting out of her state-owned Jeep Cherokee.
A Breathalyzer test determined that Parker's blood-alcohol level was 0.16 percent. The results were never entered into evidence because the judge found the probable cause for the stop insufficient.
Kelly said he would have challenged the Breathalyzer results as well.
Parker said she had one chocolate martini that night at a function at Club Champagne, and she denied driving the wrong way on Haines. Kelly said officers in Germantown stop motorists without sufficient cause "all the time."
"She's standing up for people's constitutional rights," he said of Parker. "She wasn't driving the wrong way, she wasn't speeding, she wasn't swerving."
The attorney general's motion said that several of the judge's findings about the officers "are clearly contradicted by the record" and that Hayden failed to "give findings of fact and conclusions of law . . . in any intelligible fashion."
Kelly said rulings based on credibility were hard to overturn.
"The judge believed my client over the officers," he said. "The judge didn't misread the law. The facts are determined by the judge."
The Attorney General's Office also has 30 days from Hayden's initial ruling to appeal to the Court of Common Pleas. A spokesman for the Attorney General's Office did not return phone calls Tuesday.
Parker, a former aide to City Councilwoman Marian B. Tasco, has represented the 200th District since a 2005 special election. The district includes Mount Airy, Chestnut Hill, Roxborough, and Andorra.
Contact staff writer Troy Graham at 215-854-2730, firstname.lastname@example.org, or @troyjgraham on Twitter.