I’d also change the string building to that
snprintf(publishString, sizeof(publishString)
, "{\"x\":%d,\"y\":%d,\"z\":%d}"
, xGyro, yGyro, zGyro);
BTW, have a look at this
They usually have demo code and/or libraries to run their sensor boards with Particle devices too.