"We recently found a bug that automatically suggested posting publicly when some people were creating their Facebook posts," Erin Egan said in a statement seen by CNN.
The US website said the bug had affected posts made between May 18 and May 22 when Facebook was testing a new feature.
Users are given a range of options on the size of the audience they want to share a post with and this choice is then applied automatically to all succeeding posts, if left unchanged.
Affected users will begin receiving notifications to review the posts they made during that period of time to see if the audience was selected correctly.
This is the latest in a string of mishaps at the social media giant after it came under fire over a scandal involving a UK consultancy, Cambridge Analytica, which illegally harvested private data to use it for political profiling.