title: How to use Facebook Sign in CallbackManager with onActivityResult deprecated?
body: <p>Im creating app with Facebook sign in option. I did everything so far, but having problem with the result after from the Facebook App. I followed Google's documentation, but that one is not updated with the newly deprecated onActivityResult function. Now, I have already used the new way of getting result from another activity from <a href="https://developer.android.com/training/basics/intents/result" rel="noreferrer">this</a>. However, this is not applicable on the Facebook sign in implementation due to not using the the registerForActivityResult launcher, but it uses its own callback manager.</p>
  <p>Has anyone come up with a solution to this problem? Maybe I'm missing something out.</p>
  <pre><code> callbackManager = CallbackManager.Factory.create()
      signInWithFacebook.setReadPermissions(&quot;email&quot;, &quot;public_profile&quot;)
  
      signInWithFacebook.registerCallback(
          callbackManager,
          object : FacebookCallback&lt;LoginResult&gt; {
              override fun onSuccess(result: LoginResult) {
                  handleFacebookAccessToken(result.accessToken)
              }
  
              override fun onCancel() {
       
              }
  
              override fun onError(error: FacebookException?) {
                
              }
          })
  
  
  
  
  override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
          super.onActivityResult(requestCode, resultCode, data)
          callbackManager.onActivityResult(requestCode, resultCode, data)
      }
  
  
  private fun handleFacebookAccessToken(token: AccessToken) {
      val credential = FacebookAuthProvider.getCredential(token.token)
      auth.signInWithCredential(credential)
          .addOnCompleteListener(OnCompleteListener {
              if (it.isSuccessful) {
  
              } else {
                
              }
          })
  } 
  </code></pre>