As a result, U.S. Rep. Edward Markey's campaign said it would make a donation to a charity chosen by U.S. Rep. Stephen Lynch, under terms of the so-called "People's Pledge."

Steyer, a longtime Democratic donor and supporter of environmental causes, warned Lynch in a letter earlier this week that he would launch an "aggressive public education campaign" against the South Boston Democrat if he did not renounce his support for the Keystone XL Pipeline by "high noon" on Friday.

Opponents of the proposed pipeline, which would run from western Canada to Texas, say it would carry "dirty oil" that contributes to global warming. Supporters say there is no evidence the 1,700-mile-long pipeline would cause environmental harm and that it would create thousands of construction jobs.

Markey opposes Keystone but has nonetheless publicly called for Steyer to stay out of the Massachusetts Senate race.

His campaign manager, Sarah Benzing, said ads posted on Facebook are a "clear violation" of the agreement that Markey signed with Lynch, which covers print, broadcast and online ads.

"Ed Markey signed the People's Pledge to keep billionaires like Steyer from influencing our elections, and our campaign is committed to following the pledge now," Benzing said in a statement.

Christopher LeHane, a spokesman for Steyer, disagreed with the claim that the Facebook ads violated the pledge.

The ads that were paid for by Steyer do not mention the Senate campaign or either candidate by name, Lehane said, but allow viewers to link to content on the Facebook page of Regeneration Mass, a group comprised of four young Massachusetts environmental activists who had appealed to Steyer for help in making their case against Lynch.

"I believe there are no campaign ads on Facebook," Lehane said.

The People's Pledge is modeled on a similar agreement that kept virtually all advertising from independent groups out of last year's closely watched U.S. Senate race in which Democrat Elizabeth Warren defeated incumbent Republican Scott Brown.

Markey and Lynch are vying for the Democratic nomination for the seat formerly held by John Kerry, who left the Senate in February after being confirmed as U.S. Secretary of State.

Former U.S. Attorney Michael Sullivan, state Rep. Daniel Winslow and Gabriel Gomez, a businessman and former Navy SEAL, are running on the Republican side.

The primary is scheduled for April 30 and the special election for June 25.