parse-community / ParseFacebookUtils-Android

A utility library to authenticate ParseUsers with the Facebook SDK
http://docs.parseplatform.org/android/guide/#facebook-users
Other
53 stars 63 forks source link

Facebook Log in error "facebook is not a supported service" #20

Open ghost opened 7 years ago

ghost commented 7 years ago

I want to implement a Facebook log in, I was actually using Parse for a few months but I get the "facebook is not a supported service". I followed the Parse guide and I don't know what is going on. Please help!

This is my gradle.build file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.hct.btracker"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 15
        versionName "1.1.5"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'

    compile('com.mikepenz:materialdrawer:5.4.0@aar') { transitive = true }

    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:support-v4:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'com.android.support:percent:24.2.1'

    //compile 'com.parse:parse-android:1.13.1'
    //compile 'com.parse.bolts:bolts-android:1.3.0'
    compile 'com.parse:parseui-login-android:0.0.1'
    compile 'com.parse:parseui-widget-android:0.0.1'
    compile 'com.parse:parsefacebookutils-v4-android:1.10.4@aar'

    compile 'com.github.PhilJay:MPAndroidChart:v3.0.0-beta1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.github.hotchemi:android-rate:1.0.1'
    compile 'com.github.javiersantos:AppUpdater:2.3'

    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.cleveroad:slidingtutorial:0.9.5'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'joda-time:joda-time:2.9.3'
}

This is my SignupActivity#signInByFacebook :

private void signInByFacebook() {
        if (Utils.isNetworkAvailable(getBaseContext())) {
            //ParseUser parseUser = new ParseUser();

            final List<String> permissions = Arrays.asList("public_profile", "email");

            ParseFacebookUtils.logInWithReadPermissionsInBackground(this, permissions, new LogInCallback() {
                @Override
                public void done(ParseUser user, ParseException err) {
                    if (user == null) {
                        Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
                        Log.d("MyAppError", err.getLocalizedMessage());

                    } else if (user.isNew()) {
                        //setResult(RESULT_OK);
                        //finish();
                        getUserDetailFromFB();
                        Log.d("MyApp", "User signed up and logged in through Facebook!");

                        Bundle parameters = new Bundle();
                        parameters.putString(AppEventsConstants.EVENT_PARAM_REGISTRATION_METHOD, "Facebook");
                        logger.logEvent(AppEventsConstants.EVENT_NAME_COMPLETED_REGISTRATION, parameters);

                    } else {
                        Log.d("MyApp", "User logged in through Facebook!");
                    }
                }
            });

        }
    }

I got this is my logcat:

09-21 13:02:29.018 16376-16376/com.hct.btracker D/MyApp: Uh oh. The user cancelled the Facebook login. 09-21 13:02:29.019 16376-16376/com.hct.btracker D/MyAppError: facebook is not a supported service.