Okay! I got an answer. Had this problem for weeks and finally figured it out.
Facebook has now implemented a feature that will display all devices you are logged into and will allow you to log out other devices from your Facebook account. Something has happened that has made your iphone4's log out of Facebook, but your Facebook is still saying you are logged in.
So if you log into Facebook on a computer and go to account settings.
Then go to security.
From security click on active sessions.
Locate your troubled device on the list (in this case iPhone 4) and click end activity.
This will remotely log you out from your iPhone and will allow you to re login.
Hope it helps.