A contractor can be paid for piecework: compare Mechanical Turk. (And, the actual labor required to install the app, and answer any questionnaires, was probably on the order of "minutes" rather than "hours" – and thus compensated at far above "minimum wage".)
Here you can see a VentureBeat reporter – and one who is actually a member of the California State Bar of Attorneys – raise some of the same questions as I have:
https://venturebeat.com/2019/01/31/the-odd-reason-apple-kill...
Late in this article, you can see Facebook's statement that all minors who participated did so with signed parental consent forms:
https://gizmodo.com/facebook-is-paying-teens-to-install-a-re...
Facebook's statement: "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."