The social media giant shared users' data with device makers, including Samsung and Apple, according to a new report in The New York Times.