Tamim Attafi
Tamim Attafi

Reputation: 2521

Android : FirebaseAuth - Unsuccessful debug_token response from Facebook

I'm trying to make a Facebook login method for my app using firebase. i set up my Facebook app and sdk. Logging in into Facebook works fine.. the problem is when Firebase try to signInWithCredential the Authentication fails. i didn't find any working solutions yet. So here's my Logcat :

signInWithCredential:failure
                                                           com.google.firebase.FirebaseException: An internal error has occurred. [ Unsuccessful debug_token response from Facebook:{"error":{"message":"(#100) You must provide an app access token or a user access token that is an owner or developer of the app","type":"OAuthException","code":100,"fbtrace_id":"CnaYlxG66lv"}} ]
                                                               at com.google.android.gms.internal.zzdxm.zzao(Unknown Source)
                                                               at com.google.android.gms.internal.zzdwn.zza(Unknown Source)
                                                               at com.google.android.gms.internal.zzdxx.zzap(Unknown Source)
                                                               at com.google.android.gms.internal.zzdya.onFailure(Unknown Source)
                                                               at com.google.android.gms.internal.zzdxo.onTransact(Unknown Source)
                                                               at android.os.Binder.execTransact(Binder.java:573)

Here's my Code :

I Think that's everything , if there's something else just point me and I'll update my answer , Thank you!

Upvotes: 0

Views: 1152

Answers (1)

van
van

Reputation: 600

Try and update your functions inside your onClick function. I tested the method below and it logs in. I'm having a separate issue with firebase (I believe)

this.fbLoginManager.registerCallback(this.callbackManager, new FacebookCallback<LoginResult>() {
        @Override
        public void onSuccess(LoginResult loginResult) {
            GraphRequest request = GraphRequest.newMeRequest(loginResult.getAccessToken(), new GraphJSONObjectCallback() {
                @Override
                public void onCompleted(JSONObject object, GraphResponse response) {
                    Log.v("Main", response.toString());
                    setProfileToView(object);
                }
            });
            Bundle parameters = new Bundle();
            parameters.putString(GraphRequest.FIELDS_PARAM, "id, name, email, gender, birthday, picture.type(large)");
            request.setParameters(parameters);
            request.executeAsync();
        }



        @Override
        public void onCancel() {

        }

        @Override
        public void onError(FacebookException error) {
            Toast.makeText(LoginActivity.this.getApplicationContext(), error.toString(), Toast.LENGTH_SHORT).show();
        }

    });

Upvotes: 1

Related Questions