Social networks have gained growing popularity in various application domains. World Wide Web has facilitated the application of information collection, dissemination and analyses to a great extent. Privacy protection is therefore especially challenged in publishing network data, because an individual's network contents can be used for identifying themselves even if other identified information is removed. However, up to now, most of the work is paying close attention to structural attacks and to the best of our knowledge, there is no effort on how to resist homogeneity attack simultaneously. In this paper, we propose a model (called k-1 generalized graph) to protect against structural and homogeneity attacks and to develop an algorithm that produces k-1 generalized graph.