Facebook Blank Page After Login & Authorization (Ever Succeed Before, Until Google Sign In Added)

I am making an Android application that can do Facebook login (Using Facebok SDK 4.x) and Google Plus Sign In. My Facebook login ever succeed login and fetch data. However, now it can not do login and the login page turned white after it shows authorization page.. This has happened since I added Google Sign In on login page. My Google sign in works fine and I am able to fetch data with Google sign in too..

I have been working on this issue for several days, but can not find solution for blank login page. These are steps that happen on my FB login:

  1. Loading
  2. Facebook Login interface (Name and Password field)
  3. Authorization (It says “you have authorization this application…”, which sometimes appears and sometimes does not appear. When it does not appear, it has blank page)
  4. Blank Page, you can see the picture here

Anyone can tell me how to fix this??

Here is a sample of my code

FacebookSdk.sdkInitialize(getApplicationContext());
        setContentView(R.layout.login); //fb order code
        loginButton = (LoginButton) findViewById(R.id.loginfb);
        callbackManager = CallbackManager.Factory.create(); //for login button
    //setting permission for FB
    loginButton.setReadPermissions(Arrays.asList("public_profile", "email"));

final FacebookCallback<LoginResult> fbcallback = new FacebookCallback<LoginResult>() {
            @Override
            public void onSuccess(final LoginResult loginResult) {
                accessTokenTracker.startTracking();
                profileTracker.startTracking();

                final GraphRequest graphRequest = GraphRequest.newMeRequest(loginResult.getAccessToken(),
                        new GraphRequest.GraphJSONObjectCallback()
                {
                    //Getting info after successful Login
                    @Override
                    public void onCompleted(JSONObject object, GraphResponse response)
                    {
                       some code.....

                            try {
                                pref.savePref("TYPE_SIGN_IN","FB");

                                Intent i = new Intent(Login.this, ChooseLanguage.class);
                                i.putExtra("token", TokenResult);
                                startActivity(i);

                            } catch (Exception e) {
                                Log.v("Login", "error");
                                Toast.makeText(getApplicationContext(), "Fail to Login", Toast.LENGTH_LONG).show();
                                e.printStackTrace();
                            }
                    }
                });
                Bundle params = new Bundle(); //pass facebook data?
                params.putString("fields", "id, name, email"); //Fields required
                graphRequest.setParameters(params);

                graphRequest.executeAsync(); //Executing request asynchronously
            }

            @Override
            public void onCancel() {
            }

            @Override
            public void onError(FacebookException e) {

            }
        };

        loginButton.registerCallback(callbackManager, fbcallback);

Error Log.. (I think I ever saw some of Katana errors before, but my FB login could still run)

05-20 14:37:13.041 5507-5507/com.sam.cultureexplorer
E/dalvikvm﹕ Could not find class ‘android.app.AppOpsManager’,
referenced from method
com.google.android.gms.common.GooglePlayServicesUtil.zza 05-20
14:37:13.501 5507-5530/com.sam.cultureexplorer
E/ActivityThread﹕ Failed to find provider info for
com.facebook.katana.provider.AttributionIdProvider 05-20 14:37:13.501
5507-5531/com.sam.cultureexplorer E/ActivityThread﹕ Failed to find
provider info for com.facebook.katana.provider.AttributionIdProvider
05-20 14:37:13.511 5507-5527/com.sam.cultureexplorer
E/ActivityThread﹕ Failed to find provider info for
com.facebook.katana.provider.AttributionIdProvider 05-20 14:37:21.431
5507-5507/com.sam.cultureexplorer E/ActivityThread﹕ Failed to find
provider info for com.facebook.katana.provider.PlatformProvider 05-20
14:37:21.431 5507-5507/com.sam.cultureexplorer
E/ActivityThread﹕ Failed to find provider info for
com.facebook.wakizashi.provider.PlatformProvider


Source: facebook

Leave a Reply