Yes, this could be a virus installed on your tablet. However, if the error was fixed by updating the Facebook application, then it should also be considered as a bug in the application's code that triggered the camera automatically. To check the tablet for infections, simply install a virus solution from the Play Store. You can use Bitdefender, for example.