How to properly implement Facebook login for ionic 'desktop' build?

Well… there is best practices for Facebook JS SDK for AngularJS
https://developers.facebook.com/docs/javascript/howto/angularjs

However, I just wonder how to robustly integrate it for ionic3 i.e. being able to conditionally and automatically build for iOS, Android versus Desktop using the same code and fallback mechanism between native cordova plugin and the web integration.

Any recommendation?