Understanding Public Perceptions and Discussions on Opioids Through Twitter: Cross-Sectional Infodemiology Study
Authors: Carabot Federico , Fraile-Martínez Oscar , Donat-Vargas Carolina , Santoma Javier , Garcia-Montero Cielo , Pinto da Costa Mariana , Molina-Ruiz Rosa M , Ortega Miguel A , Alvarez-Mon Melchor , Alvarez-Mon Miguel Angel 
Published: September 2023

Background
Opioids are used for the treatment of refractory pain, but their inappropriate use has detrimental consequences for health. Understanding the current experiences and perceptions of patients in a spontaneous and colloquial environment regarding the key drugs involved in the opioid crisis is of utmost significance.

Objective
The study aims to analyze Twitter content related to opioids, with objectives including characterizing users participating in these conversations, identifying prevalent topics and gauging public perception, assessing opinions on drug efficacy and tolerability, and detecting discussions related to drug dispensing, prescription, or acquisition.

Methods
In this cross-sectional study, we gathered public tweets concerning major opioids posted in English or Spanish between January 1, 2019, and December 31, 2020. A total of 256,218 tweets were collected. Approximately 27% (69,222/256,218) were excluded. Subsequently, 7000 tweets were subjected to manual analysis based on a codebook developed by the researchers. The remaining databases underwent analysis using machine learning classifiers. In the codebook, the type of user was the initial classification domain. We differentiated between patients, family members and friends, health care professionals, and institutions. Next, a distinction was made between medical and nonmedical content. If it was medical in nature, we classified it according to whether it referred to the drug’s efficacy or adverse effects. In nonmedical content tweets, we analyzed whether the content referred to management issues (eg, pharmacy dispensation, medical appointment prescriptions, commercial advertisements, or legal aspects) or the trivialization of the drug.

Results
Among the entire array of scrutinized pharmaceuticals, fentanyl emerged as the predominant subject, featuring in 27% (39,997/148,335 posts) of the tweets. Concerning user categorization, roughly 70% (101,259/148,335) were classified as patients. Nevertheless, tweets posted by health care professionals obtained the highest number of retweets (37/16,956, 0.2% of their posts received over 100 retweets). We found statistically significant differences in the distribution concerning efficacy and side effects among distinct drug categories (P<.001). Nearly 60% (84,401/148,335) of the posts were devoted to nonmedical subjects. Within this category, legal facets and recreational use surfaced as the most prevalent themes, while in the medical discourse, efficacy constituted the most frequent topic, with over 90% (45,621/48,777) of instances characterizing it as poor or null. The opioid with the greatest proportion of tweets concerning legal considerations was fentanyl. Furthermore, fentanyl was the drug most frequently offered for sale on Twitter, while methadone generated the most tweets about pharmacy delivery.

Conclusions
The opioid crisis is present on social media, where tweets discuss legal and recreational use. Opioid users are the most active participants, prioritizing medication efficacy over side effects. Surprisingly, health care professionals generate the most engagement, indicating their positive reception. Authorities must monitor web-based opioid discussions to detect illicit acquisitions and recreational use.