Jet photoproduction, where the two highest transverse energy (ETjet) jets have ETjet above 6 GeV and a jet-jet invariant mass above 23 GeV, has been studied with the ZEUS detector at the HERA ep collider. Resolved and direct photoproduction samples have been separated. The cross section as a function of the angle between the jet-jet axis and the beam direction in the dijet rest frame has been measured for the two samples. The measured angular distributions differ markedly from each other. They agree with the predictions of QCD calculations, where the different angular distributions reflect the different spins of the quark and gluon exchanged in the hard subprocess