Topic modeling can be used to improve the mutuality and interpenetration of community discovery and role analysis in social media. Also, it is useful to uncover communities and roles that are both social and topic-aware. In the present manuscript, we explore the exploitation of topic modeling to inform the seamless integration of community discovery and role analysis. For this purpose, we develop an innovative generative model of social media, in which the interrelation among communities, roles and topics is explained from a fully Bayesian perspective. Essentially, communities, roles and topics are latent factors that interact in an underlying generative process, to govern link formation and message wording. Posterior inference under the devised model allows for a variety of exploratory, descriptive and predictive tasks. These include the detection and interpretation of overlapping communities, roles and topics as well as the prediction of missing links. We derive the mathematical details of variational inference and design a coordinate-ascent algorithm implementing the latter. An empirical assessment on real-world social media demonstrates a superior accuracy of the proposed model in community discovery and link prediction compared to several established competitors, which substantiates the rationality of both our modeling effort and the underlying intuition.