SAN FRANCISCO (Reuters) - A bomb threat prompted authorities on Tuesday to evacuate a building at the Silicon Valley headquarters of Facebook Inc FB.O, police said, but gave the "all clear" after an hours-long search turned up no sign of a device.

The New York Police Department had received an anonymous tip about a bomb threat regarding Facebook’s campus in Menlo Park, California, and alerted local authorities at about 4:30 p.m., a spokeswoman for the Menlo Park police said.

Late on Tuesday, police said the building was secure, however.

“The San Mateo County bomb unit was dispatched with explosive detection dogs that conducted a sweep of the building and found no suspicious packages or devices,” they said.

“The building is all clear and secure.”

Menlo Park police spokeswoman Nicole Acker had said the evacuation was confined to a three-story facility on campus that was not the headquarters building, but a company spokesman said by email that “a few” buildings on the site had been evacuated.

Everyone was safe, Facebook and police said.

“We take the safety and security of our people at Facebook extremely seriously and are glad that everyone is safe,” said spokeswoman Genevieve Grdina, adding that the firm had taken

swift action to evacuate several buildings.

“We are working closely with local authorities to investigate this threat and further monitor the situation.”

Another Silicon Valley company to face a security threat in the recent past was YouTube. In April, a woman opened fire at its headquarters in San Francisco, wounding three people before she shot herself dead.