In addition to economic and infrastructural factors, social connections of people also influence migration patterns. This influence can be attributed to the resources that are made available by social contacts: social capital, which can also be utilized in the process of migration. Based on previous literature, we identify three different aspects of social capital and test their relationship with domestic migration simultaneously. First, we analyse if the intensity of connections within communities (local social capital) restrains from migration. Second, if the intensity of connections between two communities (bridging social capital) is associated with increased migration between them. Finally, we consider, if the extent to which local community networks exhibit open or closed structures (bonding social capital) contributes to higher or lower migration rates. We create indicators for these measures using archived online social network data, covering 40% of the adult population of Hungary, and combine them with official migration data of 175 subregions. Based on point-to-point gravity and negative binomial models, we find that bridging social capital between subregions is associated with increased migration flows, but we do not find that local social capital restrains from migration.