Force detection in levitated optomechanics