Human contact patterns are a key determinant driving the spread of respiratory infectious diseases. However, the relationship between contact patterns and seasonality as well as their possible association with the seasonality of respiratory diseases is yet to be clarified. We investigated the association between temperature and human contact patterns using data collected through a cross-sectional diary-based contact survey in Shanghai, China, between December 24, 2017, and May 30, 2018. We then developed a compartmental model of influenza transmission informed by the derived seasonal trends in the number of contacts and validated it against A(H1N1)pdm09 influenza data collected in Shanghai during the same period. We identified a significant inverse relationship between the number of contacts and the seasonal temperature trend defined as a spline interpolation of temperature data (p = 0.003). We estimated an average of 16.4 (95% PrI: 15.1-17.5) contacts per day in December 2017 that increased to an average of 17.6 contacts (95% PrI: 16.5-19.3) in January 2018 and then declined to an average of 10.3 (95% PrI: 9.4-10.8) in May 2018. Estimates of influenza incidence obtained by the compartmental model comply with the observed epidemiological data. The reproduction number was estimated to increase from 1.24 (95% CI: 1.21-1.27) in December to a peak of 1.34 (95% CI: 1.31-1.37) in January. The estimated median infection attack rate at the end of the season was 27.4% (95% CI: 23.7-30.5%). Our findings support a relationship between temperature and contact patterns, which can contribute to deepen the understanding of the relationship between social interactions and the epidemiology of respiratory infectious diseases.