McDonald’s (MCD) executives are probably grimacing at a public relations snafu involving a tweet calling President Trump “a disgusting excuse of a president.”

The tweet, sent Thursday morning, was pinned to the top of the account before it was pulled from its feed.

Lads I can't handle McDonald's starting on Trump. This is our world now pic.twitter.com/co5oJIO66p — Rachel (@RachelCDailey) March 16, 2017

In a statement to CBS MoneyWatch, McDonald’s said, “Twitter notified us that our account was compromised.” It added, “We deleted the tweet, secured our account and are now investigating this.”

Get Breaking News Delivered to Your Inbox

Later in the day, McDonald’s said it determined a hack was behind the tweet. “Based on our investigation, we have determined that our Twitter account was hacked by an external source,” it said in a statement. “We took swift action to secure it, and we apologize this tweet was sent through our corporate McDonald’s account.”

The rogue tweet highlights the risks of social media, when high-profile accounts can be either hijacked or sometimes targeted by “trolls,” in social media parlance, who harass the account and its followers. It may be no coincidence that the person behind the anti-Trump tweet turned to Twitter to broadcast his or her message, given that President Donald Trump relies on the social media network to reach out to his 20 million followers. Mr. Trump has tweeted on everything from policy issues to his anger about being satirized on “Saturday Night Live.”

As for the bogus tweet from McDonald’s, some fans were lovin’ it on Thursday.

“I’ll buy 100 McNuggets right now if you put the tweet back up,” one person wrote on Twitter. Others chimed in, “I’ll throw in another 100” and “I will buy 500 McNuggets and donate them to the homeless.”

While fans of Mr. Trump’s may not have been amused, some experts said the tweet could actually help boost McDonald’s standing.

That was actually pretty good marketing @McDonaldsCorp ...now I want a breakfast sandwich. Tastes like freedom (of speech). — Adam Singer (@AdamSinger) March 16, 2017

“That was actually pretty good marketing @McDonaldsCorp,” wrote Adam Singer, analytics advocate at Google. “Now I want a breakfast sandwich. Tastes like freedom (of speech).”

While the McDonald’s tweet was the apparent work of a hacker, other companies have gained legions of fans for snark. Fast-food rival Wendy’s, for instance, became an unlikely social media star when it engaged in verbal sparring with a Twitter troll earlier this year.

Trump did not respond to the McDonald’s 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.

Some Trump supporters said McDonald’s had not done enough to atone for the tweet and advocated for a boycott.

“Hey @McDonaldsCorp YOU can’t just undo a tweet!!! Since you don’t support America, Americans will not support YOU!!! #BoycottMcDonalds,” wrote Deborah Brewer‏ (@Debbie92083).

Analysts said the hack raises questions about security at Twitter, but was unlikely to do much damage to the 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.

Reuters contributed to this report.