In recent years, with the rapid development of online social networks, an enormous amount of information has been generated and diffused by human interactions through online social networks. The availability of information diffused by users of online social networks has facilitated the investigation of information diffusion and influence maximization. In this paper, we focus on the influence maximization problem in social networks, which refers to the identification of a small subset of target nodes for maximizing the spread of influence under a given diffusion model. We first propose a learning automaton-based algorithm for solving the minimum positive influence dominating set (MPIDS) problem, and then use the MPIDS for influence maximization in online social networks. We also prove that by proper choice of the parameters of the algorithm, the probability of finding the MPIDS can be made as close to unity as possible. Experimental simulations on real and synthetic networks confirm the superiority of the algorithm for finding the MPIDS Experimental results also show that finding initial target seeds for influence maximization using the MPIDS outperforms well-known existing algorithms.