Nowadays, social networks sites (SNs) are widely used in a variety of applications such as viral marketing. Given a huge number of users on SNs, the process of selecting appropriate users as the target set is key decision for enterprises to conduct cost-effective targeted marketing and reputation management. Several methods have been presented to find influential users for viral marketing in social networks. One of the weaknesses of previous methods is the selection of target sets who activate similar users and have high spreading ability in the whole network. In this paper, an optimization model is proposed to identify the most influential users of social networks in another view by splitting a big network into small parts as communities and considering both positive and negative interactions between users to create the influence graph. Our model takes the usefulness and similarity of the users into account and tries to select the most profitable users with the lowest possible similarity in which the number of target users is automatically determined. Assessments on real and synthetic networks indicate that the proposed method is capable to select a target set with high profit and gives better performance than other methods.