How to add a logout callback for facebook sdk in android

后端 未结 3 1939
春和景丽
春和景丽 2021-01-04 06:13

I have integrated Facebook sdk in my android app. As described in the manual I added the login callback for facebook. But I have to change the UI if the user logs out from f

3条回答
  •  渐次进展
    2021-01-04 06:39

    This worked for me:-

    profileTracker = new ProfileTracker() {
            @Override
            protected void onCurrentProfileChanged(
                    Profile oldProfile,
                    Profile currentProfile) {
    
                if(currentProfile == null){
                    tvUNameandEmail.setText(R.string.app_name);
                }
            }
        };
    

提交回复
热议问题