Facebook has fixed a worm that was auto-posting messages to some users’ walls.The bug, caused by a weakness in the social network’s mobile API, was caused by a JavaScript problem.

Frederic Wolens, a Facebook spokesman, said that the bug has been fixed. “This vulnerability in our API code was communicated to us, and we worked quickly to resolve this matter,” he said in a statement. “The bug caused a small number of spam comments to be posted to users’ walls, and we are in the process of cleaning up any spam it may have caused.”

(Post Co. Chairman and Chief Executive Donald E. Graham sits on Facebook’s board of directors, and the newspaper and many Post staffers use Facebook for marketing purposes.)

Related stories:

Symantec warns about Facebook auto-posting attack

Facebook offering site-wide 'HTTPS' security

Facebook adds one-time passwords, remote logout