In this paper, we are devoted to establishing the compactness and existence results of the solutions to the fractional Nirenberg problem for n = 3, σ = 1/2, when the prescribing σ-curvature function satisfies the (n − 2σ)-flatness condition near its critical points. The compactness results are new and optimal. In addition, we obtain a degree-counting formula of all solutions. From our results, we can know where blow up occur. Moreover, for any finite distinct points, the sequence of solutions that blow up precisely at these points can be constructed. We extend the results of Li in [26, CPAM, 1996] from the local problem to nonlocal cases.