Facebook login in fragment in android

后端 未结 3 881
闹比i
闹比i 2020-12-28 17:54

I\'m trying to login Facebook using custom interface it worked fine in Activity class. same thing i have to do in Fragment too. but Callback is not executing. is it not poss

3条回答
  •  甜味超标
    2020-12-28 18:34

    You just need to add one line inside fragment

    fbLoginButton.setFragment(this);
    

    You will get the control in

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {}
    

提交回复
热议问题