Welcome to Apple Support Communities.
If I'm understanding correctly, you are unable to log out of Facebook while in Safari. This is not normal behavior, but I'll be happy to help out. Let's try clearing the browsing history, which will clear all website data, including Facebook. Then, reload Facebook in Safari, log in and see if you can log out.
Here's how to clear your browsing history from our article: Clear the history and cookies from Safari on your iPhone, iPad, or iPod touch
Delete history, cache, and cookies
Here's how to clear information from your device:
- To clear your history and cookies, tap Settings > Safari > Clear History and Website Data. Clearing your history, cookies, and browsing data from Safari won't change your AutoFill information.
- To clear your cookies and keep your history, tap Settings > Safari > Advanced > Website Data > Remove All Website Data.
- To visit sites without leaving a history, turn private browsing on or off.
When there's no history or website data to clear, the setting turns gray. The setting might also be gray if parental controls are set for websites. To check your settings, go to Settings > General > Restrictions, scroll to Allowed Content, then tap Websites.