Although a lot of literatures have been proposed on the issue of privacy preserve with relational data, social networks bring new challenges of resisting re-identify attacks. Based on message passing, an approach of privacy preserve in social networks is proposed in this paper. Individuals are assigned to different clusters according to their quasi-identifies and structural similarity measured by message passing. With clusters, k-anonymous mask networks are achieved where any individual is indistinguishable to other k-1 individuals. The experiments show our approach can protect individuals'privacy effectively in social networks with little information loss during generalization.