Background: To investigate the effect of a social media platform for the treatment of Helicobacter pylori infection.Materials and Methods: We enrolled 222 patients from October 2018 to June 2019, who required H pylori therapy. We used WeChat, a social media platform, as a patient reminder tool. They were randomly divided into the intervention and control groups (n = 111 per group) to compare and evaluate their disease awareness, medication adherence, incidence of adverse drug reactions, and H pylori eradication rate.Results: Patients in the intervention group had significantly better disease‐related knowledge, medication adherence, and H pylori eradication rates than those in the control group (P < .05).Conclusions: Using a social media platform may improve treatment rates of H pylori infection.