Hello bmcfa43,
Welcome to Apple Support Communities! We understand that you're experiencing an error when attempting to log into the Facebook and Messenger app, but you're able to successfully log into these services using a browser. We're happy to do all we can to assist.
First, we'd recommend making sure your device is updated to the latest version of iOS. Update your iPhone, iPad, or iPod touch
After confirming that the software on your iPhone is up-to-date, check for updates in the App Store. How to manually update apps on your Apple device
Attempting to log in while connected to a different network (Wi-Fi or cellular) may help as well.
If you continue to experience issues, you'll want to contact the app developer. How to contact an app developer
Let us know if this helps.
Cheers!