facebook login in android LoginButton.setFragment

前端 未结 2 853
我在风中等你
我在风中等你 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: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);
    }
    

提交回复
热议问题