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

datasmurfen picture datasmurfen · May 28, 2015 · Viewed 8.8k times · Source

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 matching my issue.

I am adding Login.java class below.

public class Login extends Activity {



/**
 * Called when the activity is first created.
 */

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FacebookSdk.sdkInitialize(getApplicationContext());
    setContentView(R.layout.activity_login);
    CallbackManager callbackManager = CallbackManager.Factory.create();
    LoginButton loginButton = (LoginButton) findViewById(R.id.login_button);
    loginButton.setReadPermissions("public_profile", "email", "user_friends");

    // Other app specific specialization

    loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {


        @Override
        public void onSuccess(LoginResult loginResult) {

            Log.i("Login", "Logged in: ");
          Intent i = new Intent(Login.this, MainActivity.class);
            startActivity(i);
        }

        @Override
        public void onCancel() {
            // App code

        }

        @Override
        public void onError(FacebookException exception) {
            // App code
            Log.i("Error" , "Error");
        }


    });
}
}

StackTrace:

Answer

Greg Cockroft picture Greg Cockroft · Nov 15, 2015

Check your android:noHistory flag on the activity.

See link https://developers.facebook.com/bugs/1621984714705591/ look for post by Andreas Bergenwall