The hacking group OurMine posted on the Twitter and Instagram accounts for Facebook and Messenger, writing "even Facebook is hackable".
The accounts have now been restored.
OurMine claims its attacks are an attempt to show cyber vulnerabilities. In January it hijacked over a dozen accounts for teams in the US National Football League.
The group posted a statement on Facebook's Twitter account. "Hi, we are OurMine. Well, even Facebook is hackable but at least their security is better then Twitter."
It also hijacked the Facebook and Messenger accounts on Instagram to post a photo of OurMine's logo.
Facebook's own website was not hacked.
Twitter confirmed that the hacking occurred via a third-party and that accounts were locked once it was alerted to the issue.
"As soon as we were made aware of the issue, we locked the compromised accounts and are working closely with our partners at Facebook to restore them," Twitter said in a statement.
The attack on Facebook seems to have followed a similar hack on teams in the National Football League. The accounts appear to have been accessed via the third-party platform Khoros.
Khoros is a marketing platform that businesses can use to manage their social media communications. Typically these platforms manage or have access to the passwords and login details of their customers.
Khoros did not respond to a BBC request for comment.
OurMine is a Dubai-based hacking group that attacked the accounts of corporations and high-profile individuals in the past. In the past, it has temporality infiltrated the social media account of Twitter's founder Jack Dorsey, Google's chief executive Sundar Pichai, and the corporate accounts of Netflix and ESPN
The group claims its attacks are designed to show a lack of security. But it also instructs victims to use its services to improve safeguards.