If you want to Log out of Messenger via the Facebook application then you can follow the below steps:
1) Open your Facebook Applications
2) Go to the menu section and Settings and Privacy option.
3) Then, you will see the "where you have logged in option"
4) Then You will see all the devices, where you have logged in.
5) Then, go for the selected devices and click on Log Out button.