George has an iPhone 7 Plus and the screen goes black when he's in Facebook. Leo says that it's possible that his case could be squeezing the phone, causing it to shut down. Also, restarting the phone once a week will clear out any code that could cause problems.
Scooter X says that in iOS 9, there was an issue where Facebook would go dark. So George should make sure he's updated. While he's at it, he should just uninstall Facebook and download and reinstall the app. There could be a problem with Facebook. There was something similar happening a few years ago.
Caller Justin says that the proximity sensor is near the edge of the screen and if his finger is too close to it, it could be triggering to turn off the phone. That's what it's designed to do.