Many social media sites have APIs that provide access to textual content, including Twitter, Facebook, and Reddit. Using these APIs requires, generally, some technical know-how and an access key from the data provider.
Other social media analysis tools:
TAGS (Twitter Archiving Google Sheet)
Each tool above has its own limitations and strengths; visit the links for more information, or see the Commons Knowledge blog post on social media analysis tools.