Read the article first. This was logging activity in the browser, not scraping.
And even under a different definition that would count normal browsing activity, the researchers still aren't doing scraping here. And each user is only collecting a few data points.
As far as I interpret it, only automated scraping is against the ToS:
https://www.facebook.com/apps/site_scraping_tos_terms.php
> You may not access or collect data from our Products using automated means (without our prior permission) or attempt to access data you do not have permission to access.