Facebook said it would change its policy requiring real names for users, following outrage over account locking.