A tweet posted after 6 a.m. Pacific Time on McDonald's main account called Trump a "disgusting excuse of a President" and issued a judgment of his hand size. The tweet, which has since been removed, was online for about 20 minutes and was pinned to the top of McDonald's Twitter feed.
About an hour later, the fast-food giant said in a tweet that Twitter had informed it the account had been compromised. "We deleted the tweet, secured our account and are now investigating this," McDonald's said.
A spokesman for Twitter said the social media site doesn't comment on individual accounts.
Numerous Twitter users responded to the tweet that disparaged Trump, with some joking that they would visit McDonald's more as a result.
Kellan Terry, a senior data analyst for BrandWatch, a company that provides social media insights, said the tweet caused McDonald's Twitter mentions to spike more than 150%.
About two-thirds of the mentions showing emotion were positive.
"Big Macs are starting to trend within the McDonald's conversation as people are either saying they are buying a Big Mac today to mark the occasion, or they wonder if Trump supporters will now 'cut Big Macs from their diet,'" Terry said.
Terry doesn't believe the tweet will have an effect on McDonald's beyond the next few days. But security experts say it should be a lesson to corporations to better secure their increasingly important social media presence.
"There are just so many ways, if you're not careful, for an adversary to have access to your social media accounts," said Michael Bailey, an associate professor of electrical and computer engineering at the University of Illinois at Urbana-Champaign. "Corporations are ripe targets because they have such a large presence on social media."
On Wednesday, hundreds of prominent Twitter accounts — from those belonging to celebrities like Justin Bieber to news organizations including Forbes — were hacked. The hackers, who are believed to have gained access through a third-party app that analyzes Twitter followers, changed the users' background photos to one of the Turkish flag and sent out political messages in Turkish.
Jack Koziol, president and founder of InfoSec Institute, an Illinois-based information security training company, said Twitter account hacks like the McDonald's incident primarily are done through phishing scams in which the hacker figures out who owns the corporate Twitter account through public information (a LinkedIn profile, for example) and then sends a password reset email to the person. If that person follows the email's prompts, he or she can inadvertently give a password, and therefore access, to a hacker.
"The two best ways to prevent this are via two-factor authentication and education," Koziol said in an email. Two-factor authentication can be set up by any account and requires a verification code sent to a phone number — in addition to the password — to log on.
Education, Koziol said, includes being knowledgeable and diligent about how to keep your personal information and your social media accounts safe.
"We don't walk around holding cash in our hand in a dark alley," he said. "We need to be smarter online as well."
Staff writer Ally Marotti contributed to this report.
11:40 a.m.: This article was updated throughout with staff reporting.