But instead of basking in the glow of his valedictory tour of Europe, Mr. Obama used the moment to make a passionate and pointed attack on bogus news stories disseminated on Facebook and other social media platforms, twice calling such false reports a threat to democracy in his hourlong news conference.