Error: Class not found when unmarshalling: com.facebook.login.Login Client Request

前端 未结 8 1432
故里飘歌
故里飘歌 2021-01-11 14:35

I am getting this error when hitting the \"Login With Facebook\" (Simple login button).

I have Google, and read other topics here - but I can not see any thing mat

8条回答
  •  借酒劲吻你
    2021-01-11 15:28

    I too had this issue. Mine however was a login call made within the FBActivity.OnResume method for callbacks to login after accepting fb perms.

    I simply moved the request into the profile tracker in the onCreate method

        ProfileTracker profileTracker = new ProfileTracker() {
            @Override
            protected void onCurrentProfileChanged(Profile oldProfile, Profile currentProfile) {
    
                Profile.fetchProfileForCurrentAccessToken();
                if(currentProfile != null) {
                    String fbUserId = currentProfile.getId();
                    profileUrl = currentProfile.getProfilePictureUri(200, 200).toString();
                    Log.d("FB profile", "got new/updated profile from thread " + fbUserId);
    
                    // jump if logged in already
                    GetFacebookProfileAndJump(currentProfile);
    
                }
    
            }
        };
    

    Also ensure your OnCreate super is as follows

        FacebookSdk.sdkInitialize(getApplicationContext());
        mCallbackmanager = CallbackManager.Factory.create();
        super.onCreate(savedInstanceState);
    
        setContentView(R.layout.activity_fbauth_);
    

    ...

提交回复
热议问题