It is often assumed that there is a robust positive symmetrical relationship between happiness and social behavior: Social relationships are viewed as essential to happiness, and happiness is thought to foster social relationships. However, empirical support for this widely held view is surprisingly mixed, and this view does little to clarify which social partner a person will be motivated to interact with when happy. To address these issues, we monitored the happiness and social interactions of more than 30,000 people for a month. We found that patterns of social interaction followed the hedonic-flexibility principle, whereby people tend to engage in happiness-enhancing social relationships when they feel bad and sustain happiness-decreasing periods of solitude and less pleasant types of social relationships that might promise long-term payoff when they feel good. These findings demonstrate that links between happiness and social behavior are more complex than often assumed in the positive-emotion literature.