Nonequilibrium phase transition in a model for social influence