Nowadays, online social media has become an inseparable part of human life, also this phenomenon is being used by individuals to send messages and share files via videos and images. Twitter, Instagram, and Facebook are well-known samples of these networks. One of the main challenges of privacy for users in these networks is anomalies in security. Anomalies in online social networks can be attributed to illegal behavior, such deviance is done by malicious people like account forgers, online fraudsters, etc. This paper proposed a new method to identify fake user accounts by calculating the similarity measures among users, applying the Generative Adversarial Network (GAN) algorithm over the Twitter dataset. The results of the proposed method showed, accuracy was able to reach 98.1% for classifying and detecting fake user accounts.