Today, mobile social networks and smartphones are highly developed and widely used. Owing to the transfer of vast amounts of data, information, and communication between users, such networks have addressed privacy as a fundamental issue. Recently, there has been a growing interest in identifying the privacy requirements of each user to act independently and dynamically according to the situations and conditions. This paper seeks to meet the privacy requirements of users by identifying their situation. For this purpose, we define a number of significant parameters in compliance with the conditions of users. Also, after inferring the current exact situation of the user, the fuzzy logic is automatically utilized to specify the privacy settings based on the conditions. To increase the accuracy in the identification of user situation, this method employs the genetic algorithm for selecting the coefficients of optimal input parameters in the fuzzy system. In this way, the fuzzy system is able to make a more accurate identification of the user situation. Compared to a similar method, the proposed method shows a better accuracy in identifying the user situation and, as a result, better performance in correctly setting the privacy.