James Martin/CNET

Some Facebook users have been giving the social network access to their phone activity in exchange for money as part of a research project since 2016, according to a Tuesday report by TechCrunch.

Facebook, which critics say isn't doing enough to protect the privacy of its users, has been giving people between the ages of 13 and 35 a payment of $20 per month plus referral fees for their phone and web activity. Facebook is able to access this data after users install a "Facebook Research" VPN app.

The company is able to view web searches, location information, private messages in social media apps, and other data, Guardian Mobile Firewall security specialist Will Strafach told TechCrunch. The study's participants are even asked to screenshot a page showing what they ordered from Amazon, according to TechCrunch.

Facebook is shutting down the Facebook Research app for Apple iOS users, according to an update to the TechCrunch story.

Apple on Wednesday confirmed that the app violated its policies. "Facebook has been using their membership [in Apple's Enterprise Developer Program] to distribute a data-collecting app to consumers, which is a clear breach of their agreement with Apple," it said in an emailed statement.

The app is similar to Facebook's Onavo Protect app that Apple banned from the App Store for violating its privacy rules, according to TechCrunch. Facebook removed the Onavo app in August.

Facebook confirmed that it was running a research program to learn about people's phone usage.

"Like many companies, we invite people to participate in research that helps us identify things we can be doing better," a Facebook spokesperson said in an emailed statement. "Since this research is aimed at helping Facebook understand how people use their mobile devices, we've provided extensive information about the type of data we collect and how they can participate. We don't share this information with others and people can stop participating at any time."

Now playing: Watch this: Did Facebook cross a line with its iOS research app?

Beta-testing services BetaBound, uTest and Applause helped distribute the app, and they don't initially mention on the sign-up pages for the social media study that they're letting Facebook access participants' data. But if minors try to join the study through a page administered by Applause, they have to get their parents to sign a form that mentions Facebook's involvement in the study.

Facebook said there's nothing secret or underhanded about the 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," the spokesperson said.

The company said that less than 5 percent of the participants in the research program were teens, and that all of them had signed parental consent forms. Since 2016, fewer than 150,000 people participated in the market research program, according to Facebook.

BetaBound, uTest and Applause didn't respond to a request for comment.

CNET's Zoey Chong contributed to this report.

First published Jan. 29, 6:47 a.m. PT.

Updates, Jan. 30 at 5:10 a.m.: Adds Facebook's statement and word that Facebook has pulled the app for iOS users; 7:32 a.m.: Includes confirmation from Apple that the Facebook app violated its policy; Jan. 31 at 10:10 a.m.: Adds the number of people who participated in Facebook's market research program.

Cambridge Analytica: Everything you need to know about Facebook's data mining scandal.

Security: Stay up-to-date on the latest in breaches, hacks, fixes and all those cybersecurity issues that keep you up at night.