1.) It looks like the XMPP integration that Facebook used to have is dead and buried at this point (https://developers.facebook.com/docs/chat)
2.) I found this NodeJS package (https://github.com/Schmavery/facebook-chat-api), which looks like it runs a headless browser to sign into Facebook and spoof Facebook into thinking that you are hitting them via their internal AJAX endpoints. This feels very fragile, but apparently it does work.
3.) I've seen some announcements that there is some sort of Messenger SDK which looks like it is currently rolled out to some select partners only right now. http://techcrunch.com/2016/01/05/facebook-messenger-bots/. I haven't seen any indications of when this would be generally available, or exactly what would be possible using it.
At the present moment, #2 seems like it is the only viable possibility, barring widespread availability of #3. Although that seems very much an ad-hoc, duct-tape and baling wire type of solution, in no way officially supported, and totally dependent on Facebook not making changes to their internal APIs...
Any better ideas?