facebook login in android LoginButton.setFragment

前端 未结 2 849
我在风中等你
我在风中等你 2021-01-06 20:23

I have problem with the LogginButton:

LoginButton authButton = (LoginButton) v.findViewById(R.id.authButton);
authButton.setFragment(this);

相关标签:
2条回答
  • 2021-01-06 21:03

    Changing your fragment to android.support.v4.app.Fragment is the only solution.

    0 讨论(0)
  • 2021-01-06 21:08

    So , in my case switching to the support library was no option i have solved it this way:

    Don't use setFragment , instead override the onActivityResult in your Acitvity and call the fragment onActivityResult from there.

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        _loginFragment.onActivityResult(requestCode, resultCode, data);
    }
    
    0 讨论(0)
提交回复
热议问题