A dual-parameter optical fiber sensor for measuring the magnetic field and temperature based on the Fabry–Perot interferometer (FPI) and magnetic polymer film was proposed and designed, realizing dual-parameter measurement of temperature and the magnetic field. The sensor uses the excellent elasticity and thermal expansion coefficient of PDMS and the magnetostrictive effect of Fe3O4 magnetic polymer film to provide magnetic field and temperature detection while maintaining good reusability, achieving a magnetic field sensitivity and temperature sensitivity of 69 pm/mT and 390 pm/K, respectively. The sensor has the advantages of a low cost, a simple manufacturing process, good linearity, and a sensitive temperature response. It has broad application prospects in medicine, geography, aerospace, and other fields.