Various social networking applications provide people with many opportunities such as expressing, commenting, disseminating and transmitting their opinions within certain limits. The emotions and ideas that people express in their messages make sense of thousands of articles and opinions published instantly. Trying to make sense of emotional data, generating meaningful information from these data, analyzing these data, and making predictions and inferences on these data is a new important study field. In this study, sentiment analysis is considered an optimization problem in order to achieve high performance. For this purpose, sunflower optimization, which is one of the new and successful plant intelligence-based algorithms, has been modelled as a sentiment analyzer for the first time. A chaotic sunflower optimization algorithm was used by combining sunflower optimization and chaos theory in order to make effective sentiment analysis. In order for the proposed method to effectively solve the sentiment analysis problem, a suitable representation form and fitness function have been proposed. The proposed method treats the data as a search space and searches for a solution for analysis by detecting emotion in this search space. An up-to-date data set including customer feedback and satisfaction information was used in the study. Results based on accuracy, precision, and recall metrics show that plant intelligence-based metaheuristic algorithms can provide high performance.