For $\mathrm{C}^1$-functions, the argument can be reduced to the circle case: Write the sphere as a union of circles meeting at the poles. On each circle the considered function is equivariant under all rotations, therefore its restriction to the circle must be of the form $t\mapsto C\exp(i\lambda t)$ for some real numbers $C,\lambda$. Since the circles meet at the poles and the function is continuously differentiable, the $C$'s and $\lambda$'s agree for all the circles. To see that $\lambda$ must be zero, apply the argument again with a different choice of poles, for example a pair of antipodal points in the original equator.