Check the social media platform's developer platform to see if they have an API or other access information. You may also search to see if another researcher has collected a relevant dataset and made it available.