“Don’t say the first thing that pops in your head. Have a little bit of an edit function,” Mr Obama told a New Delhi audience, according to the Washington Post.
“Think before you speak, think before you tweet”.
An enthusiastic and frequent Twitter user, Mr Trump has has used the platform to stoke controversy and savage opponents.
The most recent tweet-triggered firestorm was ignited by his retweets of a far-right organisation, Britain First, purporting to depict violence by Muslims.
Batting away criticism from that included a rebuke from UK Prime Minister Theresa May, White House Press Secretary Sarah Huckabee Sanders said the retweets helped “elevate the conversation” around the threats posed by extremism.
Mr Trump often issues his Twitter proclamations in early morning bursts, at times undercutting the public positions of other administration officials.
He has tweeted more than twice as many times as Mr Obama.
But the former President has a substantial edge in followers: 97.4 million to Mr Trump’s 43.7 million. He winked at that discrepancy, noting he had “more followers than people who use it more often”.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies