The interaction between social media use and mental health is of great public health concern. Studies so far, largely employing self-reported measures of social media use, have produced inconclusive evidence regarding the impact of social media on mental health. Focusing on objective behavioral markers and the psychological mechanisms underlying how users interact with social media platforms could be key to greater insight on this topic. Here we use Twitter data to study how depression modulates a central behavioral process on social media: the response to the social rewards (e.g. likes, shares, views) users receive when they post. Reinforcement learning theory predicts that social media rewards will reinforce posting behavior, such that receiving more likes will lead to posting more frequently and spending more time on the platform. However, laboratory tasks often show blunted reinforcement learning in depression, suggesting a potential attenuation of the effects of social rewards on posting behavior. Across 3 datasets with varied measures of depression and data collection strategies (over 17 million tweets from 7,736 users in total, including a pre-registered replication), we consistently found that depression was associated with a larger reinforcing effect of likes on posting on the next day. In other words, users with depression showed heightened sensitivity to social media rewards, in contrast to findings from laboratory-based tasks. These results identify a psychological mechanism that may link social media use to poor mental health, and underscore the importance of testing the generalizability of in-lab computational psychiatry findings to real-world environments.