Facebook says a bug in its system led 6 million users' contact information to be inadvertently exposed.