PurposeThis paper aims to analysis the factors that explain the effectiveness of a corporate social responsibility (CSR) communication on Facebook by a hospitality company. Taking the affect transfer hypothesis (ATH) model as a basis, the influence of beliefs about the company (attributions and corporate image) is studied and variables related to the receiver (environmental consciousness and identification with the territory) as direct antecedents of the improvement of the attitude towards the company and attitude towards the post, which influence the intention to share the information.Design/methodology/approachThis study developed a quantitative study based on a structured questionnaire targeted at regular Facebook users. Specifically, this study used a stimulus-based method, designing a fictitious post by a leading Spanish hotel chain about an environmental initiative. The post, which was shown to the participants before they answered the questionnaire, provided information about the development of an environmental programme by the hospitality company in the region where the study was carried out. Specifically, this study measured two communication outcomes (the improvement in attitude towards the hospitality company and the user’s intention to share the information) and variables related to the receiver (environmental consciousness and identification with the territory), to the message (information’s usefulness) and to the company (image and attributions) as explanatory variables. This study obtained a final sample of 239 valid surveys respecting the socio-demographic profile of the target population. The hypotheses were tested using a covariance-based structural equations model approach (software EQS 6.1).FindingsThis study observed that the ATH model is valid to measure the effectiveness of CSR communication on Facebook. Thus, the intention to share a post about an environmental initiative of the hotel is explained by both the attitude towards the company and the attitude towards the information. Factors related to the company and the environmental consciousness of the individuals exert an indirect influence. This study also found that the attitude towards the post has a double influence in the model, in the sense that it enhances the attitude towards the company and, at the same time, has a direct influence on the intention to share the information.Research limitations/implicationsThis study must first mention the use of a non-probabilistic sampling procedure, which could condition the representativeness of the sample obtained. Another limitation of our research is the use of cross-sectional data instead of longitudinal data. This study can also consider as a limitation the specific business and geographical context in which it was developed. In addition, it will be interesting to analyze other types of CSR initiatives, focused on other stakeholders, as well as to consider how the creativity of the post (text, image and/or video) could influence the effectiveness of the communication.Practical implicationsCSR information can reveal a mix of business and social attributions. The first of these, a source of scepticism and distrust, will always appear, but these extrinsic attributions do not have a negative effect in all cases. To reach positive communication outcomes, in terms of an improvement in the attitude towards the hotel and the intention to share the post and viralize the information, it is important to assure that people perceive that the hotel has a real interest in benefiting society with its initiative. To achieve this, it is very important to have a good corporate image. Furthermore, CSR-related posts may catch the attention of and generate interest in environmentally conscious people, so we suggest including CSR information in companies’ brand content strategy on social network sites (SNS) on a regular basis.Social implicationsHospitality companies have to make people aware of CSR initiatives. This study suggests including CSR information in companies’ brand content strategy on SNS on a regular basis. These channels let companies create attractive and compelling stories, and if CSR initiatives are framed on them, companies will be able to generate emotional connection with consumers. Furthermore, social platforms are relational channels, so it is advisable to use a friendly tone to connect with the individuals. Their greater or lesser participation and the possible associated comments will give clues to companies about the feelings and perceptions of people regarding CSR, which has great value.Originality/valueSocial networks can be interesting vehicles to convey CSR information, although users’ reactions towards a CSR post on these platforms have not yet been explored. This study tries to cover this gap and to contribute to the hospitality literature by studying the factors that would explain two communication outcomes of a CSR post on Facebook, one internal outcome (the improvement of the attitude towards the brand) and the other external (the intention to share the information). Furthermore, the study is a pioneer in the application of the ATH model to measure the marketing effectiveness of social media in the hotel industry.