  Angular correlations in $B^+\to X(3872) K^+$ decays, with $X(3872)\to \rho^0
J/\psi$, $\rho^0\to\pi^+\pi^-$ and $J/\psi \to\mu^+\mu^-$, are used to measure
orbital angular momentum contributions and to determine the $J^{PC}$ value of
the $X(3872)$ meson. The data correspond to an integrated luminosity of 3.0
fb$^{-1}$ of proton-proton collisions collected with the LHCb detector. This
determination, for the first time performed without assuming a value for the
orbital angular momentum, confirms the quantum numbers to be $J^{PC}=1^{++}$.
The $X(3872)$ is found to decay predominantly through S wave and an upper limit
of $4\%$ at $95\%$ C.L. is set on the fraction of D wave.
