Most likely your frog has a bacterial infection, but that could only be determined by a vet. Head-tilting is a serious matter and can be linked to:
infection (bacterial, viral or fungal) or trauma. A fecal sample will be very helpful to rule out any internal parasites. Good luck and hope your frog gets better.