  Fast radio bursts (FRBs) can be used to measure cosmological parameters by
employing the Macquart relation. However, at present, only a small number of
FRB events are localized to host galaxies with known redshifts. Inspired by the
dark siren method in gravitational wave cosmology, we develop a Bayesian method
to statistically measure the Hubble constant using unlocalized FRBs and galaxy
catalog data, which makes it possible to constrain cosmological parameters from
a large number of FRB data without known redshifts, meanwhile including the
real galaxy information. We assume that the probability for a galaxy to host an
FRB is proportional to the luminosity of this galaxy and use the results from
the IllustrisTNG simulation as the priors of FRB host galaxy parameters.
Ignoring some systematic errors, we obtain the first statistical $H_0$
measurement only using twelve unlocalized FRB events combined with the big bang
nucleosynthesis result, i.e., $H_0=80.4^{+24.1}_{-19.4}$ km s$^{-1}$
Mpc$^{-1}$, ($68\%$ highest-density interval). This method can also be refined
to constrain other cosmological and FRB parameters. It is applicable to
well-localized FRBs that still have several potential hosts.
