SAN FRANCISCO — Facebook is losing its top lawyer.

Theodore Ullyot has decided to leave the social networking giant’s legal department after almost five years as vice president, general counsel and secretary, according to media reports. A Facebook Inc. spokesman did not respond to a request for comment.