Use the Twitter API to collect tweets about a particular topic, and then use natural language processing (NLP) techniques to analyze the sentiment of the tweets. This could be used to track public opinion on a particular issue, or to identify trends in social media.
Twitter sentiment analysis