Think you're woke or effecting change because you call things out on social media? Former US president Barack Obama has a message for you: Get over yourself.

Key points: Mr Obama took aim at those using social media as a form of activism

Mr Obama took aim at those using social media as a form of activism He also urged young leaders in America not to make the same mistakes as those now in charge

He also urged young leaders in America not to make the same mistakes as those now in charge The former president's aide said she believed he was taking a shot at members of the Democratic Party

During the Obama Foundation's third annual summit in Chicago, the last Democratic president to hold office took questions from the audience around politics and what it meant to effect change, and he did not hold back in his answers.

When fired one question about change, Mr Obama suggested that young people needed to actually do things to cause change, not just call others out on social media.

"This idea of purity and you're never compromised and you're politically woke, and all that stuff — you should get over that quickly," Mr Obama said.

"The world is messy. There are ambiguities. People who do really good stuff have flaws. People who you are fighting with may love their kids and share certain things with you."

That comment may have been aimed at the youth, but in an America where both sides of politics are prominently using social media platforms to shoot arrows his former aide, Jes Psaki, told CNN she felt those comments were also aimed at politicians.

Former President Barack Obama has warned the youth of America about half-hearted activism. ( Reuters: Michaela Rehle )

"I think, in part. People running and for the party," Ms Psaki told Don Lemon.

"I think, at times the reaction to [President] Donald Trump has been to put out the purity tests that say if you don't meet these bars and not with me on every issue and don't check every box, you can't be a part of the party."

Mr Obama also urged young leaders in America not to make the same mistakes as those now in charge.

"One danger I see among young people particularly on college campuses is that I do get a sense among certain young people, and this is accelerated by social media, that the way of me making change is to be as judgmental as possible about other people and that's enough," Mr Obama added.

"Like if I tweet or hashtag about how you didn't do something right, or used the wrong verb, then I consider that I can feel pretty good about myself because, 'man did you see how woke I was, I called you out'.

"That is not activism, that is not bringing about change.

"If all you're doing is casting stones, you are probably not going to get that far."

The former president's wife, Michelle, also took part in the event and spoke about racial overtones in America, especially when she was growing up.

She used the example of white Americans moving out of a south Chicago neighbourhood after her family moved in.