  In this paper we study the problem of prescribing fractional $Q$-curvature of
order $2\sigma$ for a conformal metric on the standard sphere $\Sn$ with
$\sigma\in (0,n/2)$ and $n\geq2$. Compactness and existence results are
obtained in terms of the flatness order $\beta$ of the prescribed curvature
function $K$. Making use of integral representations and perturbation result,
we develop a unified approach to obtain these results when $\beta\in
[n-2\sigma,n)$ for all $\sigma\in (0,n/2)$. This work generalizes the
corresponding results of Jin-Li-Xiong [Math. Ann. 369: 109--151, 2017] for
$\beta\in (n-2\sigma,n)$.
