Former President Barack Obama has a message for the "politically woke" crowd that has become prolific on social media in recent years: Get over it.

Obama called out young progressives for being too ideologically rigid and judgmental during an interview Tuesday moderated by "Grown-ish" star Yara Shahidi at the Obama Foundation Summit in Chicago.

"This idea of purity and you're never compromised and you're always politically woke and all that stuff, you should get over that quickly," the two-term Democrat said. "The world is messy. There are ambiguities. People who do really good stuff have flaws. People who you are fighting may love their kids and share certain things with you."

Obama said he has particularly noticed the trend on college campuses he has visited with his daughter Malia. He described it as a "danger" that is "accelerated by social media."

He said some young people appear to think that the way to bring about change "is to be as judgmental as possible about other people, and that's enough."

Criticizing people on Twitter for doing something wrong or for a poor choice of words gives those critics a sense of self-satisfaction, he said.

"Then I can sit and feel pretty good about myself because, man, you see how woke I was, I called you out," Obama said. "That's not activism. That's not bringing about change. If all you're doing is casting stones, you're probably not going to get that far. That's easy to do."

The comments were widely applauded on social media in a rare moment of bipartisan agreement.

Conservative Fox News host Tomi Lahren said it was good to hear Obama "standing up for our rights and our values of the First Amendment."

Lahren said Obama's comments made some people "remember that we used to think Barack Obama was bad," but in contrast to today's Democratic leaders, "Obama is looking like the voice of reason."

"That's when you know the Democratic Party has gotten this bad," she said.

"Dear 2020 Dems: Listen to Obama. It's important," tweeted John Schindler, a national security columnist for the New York Observer.

University of New Mexico psychology professor Geoffrey Miller tweeted that Obama went after "the cheap-talk virtue-signaling at the heart of woke online cancel culture." Miller was censured by UNM in 2013 for a tweet that was deemed insensitive to overweight people.

"Monty Python" actor John Cleese said, "I very much like what Obama says about 'woke.'"

"Truer words have never been spoken," said drag queen Monét X Change, a former contestant on "RuPaul's Drag Race."

"Obama is right, but he's not criticizing "cancel culture" alone (whatever you think that is)," tweeted Tablet magazine writer Yair Rosenberg. "He's criticizing attempts to force normal people into black-and-white good/evil boxes, because most humans are more complicated than that and shouldn't be reduced to their worst tweet."

Although most responded positively to Obama's remarks on Twitter, Mother Jones' Ben Dreyfuss said the 44th president "must be getting 'ok boomer'd' hard on ticktock."