Social networks have become an essential part of our lives today, at least in their virtual dimension, and the image of the web world is almost impossible without the presence of this pervasive phenomenon. These networks are one of the important components of the information infrastructure, such as twitter networks, facebook networks, and so on. In the analysis of social networks, one of the important issues is the detection of community. Each community is a group of network nodes so that the connection between nodes within the group with each other is more than their connection with other network nodes. Various methods have been proposed for community detection. One of the existing methods is based on data stream clustering. The output data of a social network can be modeled with a data stream. Fast and accurate clustering of this data stream can be very effective in the detection of community. In this research, using a fast and accurate online clustering algorithm, the community is detected. The simulation results indicate that the method proposed in this research can calculate the number of clusters optimally and perform better than similar methods. The proposed algorithm can be used in many other applications.