Facebook began allowing devs to collect data in 2007, and back then were invited to do so, as long as they didn’t misrepresent themselves. Obama campaign accessing FB data was in 2012 - Back in 2012 everyone was harvesting data, including apps like Farmvile, Tinder... basically, if you could convince someone to download your app,or sign in with Facebook you could grab whatever you could and store it on your servers forever.
FBs policy changed in 2015 due to concerns about abuse.
And CA obtained the data under false pretenses -I.e. they misrepresented themselves. As far as the people granting permission knew, they were giving permission to an academic taking a survey. FB asked them back in 2015 to delete the fraudulently obtained data but didn’t follow up at the time.