McDonald's Corp. quickly deleted a tweet sent from the company's handle slamming US President Donald Trump on Thursday and said its official Twitter account had been compromised.

The tweet, which was copied and shared widely before being deleted, came a day after the Twitter accounts of a number of major news organizations, chief executives, government agencies and other high-profile users were hijacked.

"Twitter notified us that our account was compromised. We deleted the tweet, secured our account and are now investigating this," McDonald's spokeswoman Terri Hickey said in a statement.

Corporate accounts are attractive targets due to their large followings and the media attention that errant tweets can attract.

Twitter Inc allows for two-factor authentication, a security feature that would deter many attempts to seize an account.

Twitter did not immediately respond to a request for comment on Thursday.

High-profile Twitter accounts were hijacked on Wednesday to send anti-Nazi messages in Turkish in the midst of a diplomatic spat between Turkey, the Netherlands and Germany. Twitter said the source of that attack was a third-party app, whose permissions were since removed.

The tweet sent from @McDonaldsCorp on Thursday morning read: "@realdonaldtrump You are actually a disgusting excuse of a President and we would love to have @BarackObama back, also you have tiny hands."

Trump did not respond to the incident on Twitter.

Trump, one of the more fast-food friendly presidents in recent years, had tweeted pictures of himself eating food from McDonald's and other chains during the U.S. election campaign. A 2002 ad campaign featured Trump and the chain's Grimace mascot promoting an "amazing" $1 deal for McDonald's since-discontinued Big N' Tasty burger.

The incident comes as McDonald's is bolstering its digital capabilities with mobile and kiosk ordering as part of an effort to modernize the 60-year-old chain.

Analysts said the hack raises questions about security at Twitter, but was unlikely to do much damage to restaurant chain's brand.

"As long as Trump doesn't tweet at them directly, which could be pretty disastrous, this will be a short-term thing for them," said Mike Froggatt, director of intelligence at L2, which monitors the digital performance of brands.

"Twitter trending topics last for maybe 6 hours, a backlash for 10 to 12 hours and then it goes and the herd moves on," said Froggatt, who added that the incident raised the question of whether McDonald's used the safety tools Twitter offers.

The message from the account of the world's largest restaurant chain caused a sensation on Twitter, where users shared copies of the deleted tweet and offered jokes and comments.

Vanessa Veasley and other users speculated that Trump supporters could attempt to launch a boycott of the chain, as they threatened to do when Starbucks Corp Chief Executive Howard Schultz vowed to hire 10,000 refugees after Trump's first executive order temporarily banning refugees from certain countries.

"McDonald's already deleted the tweet? lol Well at least Trump supporters can finally boycott something they can actually afford," Veasley (@VanessaVeasley) wrote.