Facebook Newswire posted this picture of a black BMW with the license plate 6ELX898, which it said was photographed on the scene of drive-by shootings in Santa Barbara on May 23.

Facebook's nascent Newswire service was the first to identify the shooter in a mass murder Friday night in California, finding a photo of a black BMW on the alleged killer's page that matched license plates with a car at the scene hours before the man was identified.

"A black BMW with the license plate 6ELX898 was photographed on the scene of drive-by shootings in Santa Barbara on May 23. A photo of a car with the same license plate was posted to a Facebook account on December 3, 2013," it wrote.

It was not clear Saturday morning how Facebook was able to locate the photo.

The shooter, identified by police as Elliot Rodger, opened fire Friday night in Isla Vista, near the University of California, Santa Barbara, NBC Los Angeles reported. The suspected shooter died of a gunshot wound to the head, but officials would not say if the wound was self-inflicted.

Seven others were hospitalized, including one with life-threatening injuries.

The gunman shot victims from inside a black BMW, Santa Barbara County Sheriff Bill Brown said at a Saturday morning news conference. The shooter then engaged in a shootout with police before crashing his car. Officers found the man dead inside after they approached the vehicle, NBC reported.