Maybe facebook or some app is causing wakelock issues in the background refusing to close properly. Download wakelock detector from google play and check what apps are draining your battery. Either do a reboot or uninstall the app.
If that is not the case, watching videos or playing games on your S4 nonstop can also cause it to heat up.