Skip to main content

Posts

Showing posts from December, 2016

Facebook Sdk Callback Mechanism in Android

manages the callbacks into the FacebookSdk from an Acitivity's or Fragment's onActivityResult() method. This javadoc of   CallbackManager class from facebook sdk doesn't explain very well on how the facebook sdk interacts with our app components. It exposes just one public method : onActivityResult() which is to be called by our app's ui components from their onActivityResult. We create an instance of class  CallbackManager, using CallbackManager Factory which essentially returns a new instance of CallbackManagerImpl,  the only implementation of CallbackManager interface in facebook sdk. CallbackManagerImpl :  So, this class gets callback from our app components. But what does it do with that?  Different facebook components such as the LoginManager, AppInviteDialog register themselves with this class to be invoked for their particular case. They do so by the publicly exposed   registerCallback  method and register themselve against...