This is similar to the way Google offers reports on search trends based on its users’ aggregate search activities.
In fact, all of this is public information too. You can look at search amounts for specific searches here.
It's just numerical data. Facebook seems to do this analysis by searching all the posts that mention candidate's name and if the associated words are positive or negative.
The comparison to anonymized data in the summary is stupid. Facebook publishing any of those messages, they're just doing analysis on them. There would be good point in this article if they actually published those messages because then anonymizing doesn't work, but it's a moot point because they aren't making anything public. Only the aggregated search amounts.