Fox News anchor Bill O'Reilly, known for his close ties to Donald Trump, offered advice to the Republican nominee this week: Stay out of trouble by staying away from Twitter.

O'Reilly said Wednesday in a podcast on his website that Trump is currently getting "pounded" for engaging in fights with "regular" people, like the parents of an American soldier who died in Iraq who criticized Trump at the Democratic National Convention last week.

"But Trump has got to be disciplined and he's got to take a really deep breath, stay away from Twitter," said O'Reilly. "I mean, that Internet is — you cannot win on that thing. You cannot win."

He said Trump's "dopey, short messages" on Twitter, which Trump often uses to insult and respond to his critics, offer no longterm benefit for the candidate.

Trump is unlikely to take the advice. He has spoken frequently about his fondness for the medium, where he has nearly 11 million followers.

In an interview Tuesday on Fox News, Trump's daughter Ivanka said her father's social media strategy has been "enormously effective."