Purpose In the digital era, business-to-business (B2B) salespersons are encouraged to communicate with buyers on social media platforms and shape customer loyalty. However, the effect of social media usage and its mechanism remain unexplored. The purpose of this paper is to investigate how salespersons’ social media usage influences B2B buyers’ trust beliefs and purchase risk, and therefore, customer loyalty. Design/methodology/approach The authors conduct an online-survey, use partial least squares structural equation modeling to analyze the data, and adopt SPSS PROCESS macro 2.13 to test mediation effects. Findings Salespersons’ social media usage can enhance buyers’ trust beliefs on salespersons’ ability, integrity and benevolence, but only the latter two can improve customer loyalty. Social media usage does not directly affect purchase risk, and only benevolence can reduce purchase risk. Serial mediation models reveal that the effect of social media usage on customer loyalty is mediated by buyers’ trust beliefs on salespersons’ integrity/benevolence and purchase risk. Originality/value First, the authors confirm the effect of social media usage on customer loyalty in B2B context and refute the fallacy of social media uselessness in B2B practices. Second, the research shows that buyers’ trusting beliefs on salesperson’s ability and integrity do not significantly influence perceived risk. The finding is different from the stereotypical judgment in B2C scenarios. Third, the authors distinguish differently weighted influences of buyers’ trusting beliefs on salesperson’s ability, integrity and benevolence, and highlight the role of salespersons’ altruism attributes in shaping customer loyalty.