A former media director for the Obama campaign said Facebook allowed them to access the personal data of its users in 2011 because the social media giant was “on our side.”

“They came to office in the days following election recruiting & were very candid that they allowed us to do things they wouldn’t have allowed someone else to do because they were on our side,” Carol Davidsen, director of data integration and media analytics for Obama for America, wrote Sunday on Twitter.

Davidsen said she and her team were able to gather massive amounts of personal information from Facebook users, as well as their friends.

“Facebook was surprised we were able to suck out the whole social graph, but they didn’t stop us once they realized that was what we were doing,” she said on Twitter.

She also noted in the series of tweets that she is “100% positive that Facebook activity recruits and staffs people that are on the other side.”

​Her comments were first reported by IJR.com.

Davidsen said she built a database of every American voter by using the same Facebook tool that Cambridge Analytica exploited to amass information on 50 million users.

“We ingested the entire U.S. social graph,” Davidsen told the Washington Post. “We would ask permission to basically scrape your profile, and also scrape your friends, basically anything that was available to scrape. We scraped it all.”

But while Facebook and its users gave permission to the Obama campaign to vacuum up the data, Cambridge may have harvested the information illegally by saying it would be used for an academic study.

Facebook last week suspended Cambridge, which supplied information to Donald Trump’s 2016 campaign, for violating its privacy rules.

A number of congressional lawmakers are requesting that Facebook officials testify on Capitol Hill about how Cambridge harvested the data.