Three-qubit topological phase on entangled photon pairs