This article demonstrates the utility of combining individual survey data with social media content data in order to analyze how social context predicts individual behavior. The lack of valid and reliable measures of the contexts of social interaction in which individuals are embedded has remained an Achilles heel of the survey method. The reason is that the collection of direct observation of social interaction requires qualitative analysis of the context, which, hitherto, has been too costly to collect on a large scale. Instead, researchers have resorted to indirect measures such as aggregate group composition, respondent reports of social context, and institutional accounts. However, with the recent advent of social media data, contemporary social scientists now have social interaction data on an unprecedented scale. To utilize these data for quantitative analysis, researchers have to transform text prose into good measurement. We combine qualitative content analysis and supervised machine learning in order to ensure both semantic validity and accuracy in our measure of social interaction in Facebook groups. To test the substantive performance of the direct measures of social interaction, we use it to predict individual participation in refugee solidarity activism in Denmark. Additional testing indicates that the direct measure cannot easily be replaced by indirect measures of social interaction derived from group composition and institutional accounts. We also show how contexts and individual respondents can be effectively sampled using Facebook groups. Finally, the article discusses the limitations of social media data and points to alternate settings where our design is applicable.