Apple chief executive Tim Cook appeared to make a veiled swipe at Facebook on Friday as he spoke to new graduates at the Massachusetts Institute of Technology.

Addressing the Class of 2017, Cook emphasized the importance of baking humanity into every decision and project, particularly when it came to technology. While tech has made the world better, he said, sometimes it has revealed new problems for societies to solve.

"The potential adverse consequences [of technology] are spreading faster and cutting deeper," said Cook. "The threats to security, threats to privacy, fake news, and social media that becomes antisocial. Sometimes the very technology that is meant to connect us divides us."

Of course, Facebook's whole mission as a company is to connect people, according to its own chief executive, Mark Zuckerberg. And many Americans likely would never have heard about fake news had it not been for its prominence on Facebook during the 2016 election. Since then, Facebook has taken steps to minimize fake news's impact by working with third-party fact-checkers and highlighting when a particular article may be disputed, among other things.

Cook blamed some of these societal issues on the way we think about technology. Urging Americans not to reduce the world to algorithms but to find the essence of humanity and inject it into our technology, Cook seemed to imply that some technologies draw us in the wrong direction.

"Measure your impact in humanity not in the likes, but the lives you touch," he said. "Not in popularity, but in the people you serve."

Facebook didn't immediately respond to a request for comment. Apple declined to comment.