President Obama’s Twitter and Facebook accounts were briefly compromised this week - with two Tweets and one post altered to send links to video montages of terrorist attacks.

Both shortened links sent viewers to a graphic 24-minute video of terrorist attacks entitled, “Syria facing terrorism”.

Both Tweets were retweeted hundreds of times - with the attackers having broken into a Shortswitch account associated with the Twitter account to change the URLs, according to CNN.

The hacktivist group Syrian Electronic Army claimed responsibility for the attacks. An older campaign donation site, donate.barackobama.com was also briefly redirected to the hacker group’s own site - and carried a message, “Hacked by SEA”, according to a report by The Hacker News.

All the attacks targeted the Presidents Organizing for Action campaign. An OFA spokesman said, "An account to our link shortener was hacked." The group gained access by hacking OFA staff emails, according to a report by The Register, and boasted that “they didn’t even use two-step authentication.”

"All the links that Barack Obama account tweeted it and post it on Facebook was redirected to a video showing the truth about Syria,” a purported hacker said in an email interview with Mashable.

The group has previously targeted high-profile sites such as The New York Times - often attacking supplier companies such as DNS registrars, and using targeted spear-phishing attacks to carry out their goals.

"The SEA went after the company specifically to create a high-profile event," Melbourne IT CEO Theo Hnarakis told Reuters, after the group targeted the New York Times via his company’s email system. "This was quite a sophisticated attack."

The group has claimed responsibility for a series of high-profile hacks against media organizations and messaging apps over the past few months, with hacks targeting the Thomson Reuters, the Financial Times, CBS and chat apps such as Tango and Viber.

Previous attacks have compromised blog pages and app pages on Google Play, as well as leaking customer information and compromising official corporate Twitter feeds.

In the wake of attacks earlier this year, Twitter sent out an email to media groups saying, “We believe that these attacks will continue, and that news and media organizations will continue to be high value targets to hackers.”