In this paper, we propose a distributed algorithm for the minimum dominating set problem. For some especial networks, we prove theoretically that the achieved answer by our proposed algorithm is a constant approximation factor of the exact answer. This problem arises naturally in social networks, for example in news spreading, avoiding rumor spreading and recommendation spreading. So we implement our algorithm on massive social networks and compare our results with the state of the art algorithms. Also, we extend our algorithm to solve the -distance dominating set problem and experimentally study the efficiency of the proposed algorithm.Our proposed algorithm is fast and easy to implement and can be used in dynamic networks where the edges and vertices are added or deleted constantly. More importantly, based on the experimental results the proposed algorithm has reasonable solutions and running time which enables us to use it in distributed model practically.