With the development of the information and Internet technology, public opinions with big data will rapidly emerge in an online-offline social network, and an inefficient management of public opinions often will lead to security crises for either firms or governments. To unveil the interaction mechanism among a large number of agents between the online and offline social networks, this paper proposes a public opinion dynamics model in an online-offline social network context. Within a theoretical framework, the analytical conditions to form a consensus in the public opinion dynamics model are investigated. Furthermore, extensive simulations to investigate how the online agents impact the dynamics of public opinion formation are conducted, which unfold that online agents shorten the steady-state time, decrease the number of opinion clusters, and smooth opinion changes in the opinion dynamics. The increase of online agents often enhances these effects. The results in this paper can provide a basis for the management of public opinions in the Internet age.