When one tries to use Facebook Messages from a browser on a phone or tablet running a relatively recent Android, the website (m.facebook.com or touch.facebook.com) will open the Google Play store. Some of us prefer using browsers and avoid installing apps when possible. Unfortunately for us, Messenger does not offer a mobile website, only a link to download the app.
Luckily for us, there a are a few tricks that will help get Facebook Messages working from a browser on Android.
The trick to avoid Facebook’s nagging is to enable “Request Desktop Site” in Chrome Menu. The explanation of what this option does is available on Stack Overflow.
Firefox also has the “Request Desktop Site” but, unfortunately, it doesn’t do the job; you actually get the desktop version of Facebook and it’s quite unusable.
One option is to use mbasic.facebook.com. Unfortunately, mbasic is neither as functional nor as pretty as m, let alone touch.
The way to get Messages working on m or touch is to pretend to be running a version of Android that is unsupported by the Messenger app. In my experiments, anything older than 4.4 will do the trick, so I picked 4.3.1. You can pick your poison from Wikipedia, but bear in mind that using very old versions might get Facebook mobile website to use workarounds which are no longer needed and will break stuff if used.
To pretend to be using an old version of Android, we will alter the Firefox’s user agent string. In Firefox, go to about:config. Add a new String option called general.useragent.override the and set it to e.g.
Mozilla/5.0 (Android 4.3.1; Mobile; rv:48.0) Gecko/48.0 Firefox/48.0
Compare this with the default usera gent string which is in my case
Mozilla/5.0 (Android 6.0.1; Mobile; rv:48.0) Gecko/48.0 Firefox/48.0
Note that this string will not be automatically updated when Firefox is updated, so you should take care to update it manually. For more information about the user agent override option, check out this Super User question.