  Observations of the Faraday rotation measure, combined with the dispersion
measure, can be used to infer the magnetoionic environment of a radio source.
We investigate the magnetoionic environments of FRBs by deriving their
estimated average magnetic field strengths along the line of sight $\langle
B_{\parallel}\rangle$ in their host galaxies and comparing them with those of
Galactic pulsars and magnetars. We find that for those FRBs with RM
measurements, the mean $\langle B_{\parallel}\rangle$ is
$1.77^{+9.01}_{-1.48}\,\rm\mu G$ and $1.74^{+14.82}_{-1.55}\,\rm\mu G$ using
two different methods, which is slightly larger but not inconsistent with the
distribution of Galactic pulsars, $1.00^{+1.51}_{-0.60}\,\rm\mu G$. Only six
Galactic magnetars have estimated $\langle B_{\parallel}\rangle$. Excluding PSR
J1745--2900 that has an anomalously high value due to its proximity with the
Galactic Centre, the other three sources have a mean value of $1.70\,\rm\mu G$,
which is statistically consistent with the $\langle B_{\parallel}\rangle$
distributions of both Galactic pulsars and FRBs. There is no apparent trend of
evolution of magnetar $\langle B_{\parallel}\rangle$ as a function of age or
surface magnetic field strength. Galactic pulsars and magnetars close to the
Galactic Centre have relatively larger $\langle B_{\parallel}\rangle$ values
than other pulsars/magnetars. We discuss the implications of these results for
the magnetoionic environments of FRB 121102 within the context of magnetar
model and the model invoking a supermassive black hole, and for the origin of
FRBs in general.
