Former US president Barack Obama said the way people communicate via social media risked splintering society and leaders had to ensure the internet did not cocoon users within their own biases.

“All of us in leadership have to find ways in which we can recreate a common space on the Internet,” Mr Obama said in an interview conducted by Britain’s Prince Harry, broadcast on BBC radio on Wednesday.

“One of the dangers of the internet is that people can have entirely different realities, they can be just cocooned in information that reinforces their current biases.”

Mr Obama has previously warned that social media platforms can lead people to make snap judgements about complex decisions although he has refrained from criticising his successor Donald Trump who regularly uses Twitter.

Mr Obama said in the interview broadcast on Wednesday that social media should promote diverse views in a way that “doesn’t lead to a Balkanisation of our society” and moving online communities offline helped people to see that many issues were not as simple as they might seem in a chatroom.

“It’s also by the way harder to be as obnoxious and cruel in person as people can be anonymously on the internet,” he said.

“Meet in the pub...Meet at a place of worship. Meet in a neighbourhood and get to know each other.”

Mr Obama also reflected on the day he relinquished power to Mr Trump and said: “Overall there was serenity there, more than I would have expected,” but his sense of achievement was laced with a sense of “all the work that was left undone”. He said he viewed each presidency as part of a relay race, but felt he had passed the baton on successfully. “We had run a good race,” he said. Since leaving office, he said, life appeared to move in slow motion, but he insisted this slower pace could be liberating if it meant he “could spend an extra 45 minutes talking to Michelle or having a long breakfast”.

Wedding diplomacy

Mr Obama spoke to Prince Harry in an interview conducted by the prince as a guest editor for BBC radio’s daily morning news show and focused on their shared interest in promoting causes. The interview took place in September.

Prince Harry was asked by the BBC whether he would invite the Obamas to his wedding next year with US actress Meghan Markle.

“I don’t know about that,” Prince Harry said. “We haven’t put the invites or the guest list together. Who knows whether they are going to be invited or not. I wouldn’t want to ruin that surprise.”

The Sun newspaper in the UK said on Tuesday that British government officials had urged Prince Harry not to invite the Obamas to his wedding for fear of angering Mr Trump.

In the BBC interview, Mr Obama spoke of being able to take a longer-term view on issues such as climate change.

“Take some of the tragedies that have happened recently, with hurricanes devastating first Houston and parts of Florida and now Puerto Rico, ” he said.

“Today those aren’t my direct responsibilities but I can focus over the next 20 years in making sure that we don’t have more hurricanes and natural disasters that are accelerated as a consequence of climate change and the ability to focus long term I think is a great luxury.”–Reuters and Guardian