Facebook users went through a "rigorous consent flow" before participating in its market research program, Chief Operating Officer Sheryl Sandberg told CNBC.

Apple on Wednesday revoked some Facebook developer privileges after TechCrunch reported that the social media giant paid some users to download an app that enabled the company to track user behavior on their mobile devices, including private messages.

"The important thing is that the people involved in that research project knew they were involved and consented," Sandberg said in an interview with CNBC's Julia Boorstin after Apple's action.

Sandberg emphasized that Facebook made the project "very clear" to participants and compensated them for their participation.

A Facebook spokesperson told CNBC earlier, "Key facts about this market research program are being ignored. Despite early reports, there was nothing 'secret' about this; it was literally called the Facebook Research App. It wasn't 'spying' as all of the people who signed up to participate went through a clear on-boarding process asking for their permission and were paid to participate. Finally, less than 5 percent of the people who chose to participate in this market research program were teens. All of them with signed parental consent forms."

Sandberg's comments came after Facebook posted a record fourth-quarter profit, sending the stock more than 11 percent higher in after-hours trading. The social media company also reported growth in daily and monthly active users.

Facebook delivered those results despite continued bad publicity about the company's privacy practices, which had contributed to a more than 19 percent decline in its stock over the past year.