Well I did this to make it rotate only on one axis. Not sure of it is the right way to do it but it works.
-(void) rotate: (SpinningNode*) aNode fromSwipeVelocity: (CGPoint) swipeVelocity {
// The 2D rotation axis is perpendicular to the drag velocity.
CGPoint axis2d = ccpPerp(swipeVelocity);
// Project the 2D rotation axis into a 3D axis by mapping the 2D X & Y screen
// coords to the camera's rightDirection and upDirection, respectively.
CC3Camera* cam = self.activeCamera;
aNode.spinAxis = CC3VectorAdd(CC3VectorScaleUniform(cam.upDirection, axis2d.x),
CC3VectorScaleUniform(cam.upDirection, axis2d.y));
// Set the spin speed from the scaled drag velocity.
aNode.spinSpeed = ccpLength(swipeVelocity) * kSwipeVelocityScale;
// Mark the spinning node as free-wheeling, so that it will start spinning.
aNode.isFreeWheeling = YES;
}