0

I've been following the ParseLoginUI tutorial here: https://github.com/ParsePlatform/ParseUI-Android/tree/master/ParseLoginSampleWithDispatchActivity

In my AndroidManifest.xml, I have:

<activity
    android:name="com.parse.ui.ParseLoginActivity"
    android:label="@string/app_name"
    android:launchMode="singleTop">
    <meta-data
        android:name="com.parse.ui.ParseLoginActivity.PARSE_LOGIN_ENABLED"
        android:value="true"/>
    <!--<meta-data-->
        <!--android:name="com.parse.ui.ParseLoginActivity.PARSE_LOGIN_EMAIL_AS_USERNAME"-->
        <!--android:value="true"/>-->
    <meta-data
        android:name="com.parse.ui.ParseLoginActivity.FACEBOOK_LOGIN_ENABLED"
        android:value="true"/>
    <!--<meta-data-->
        <!--android:name="com.parse.ui.ParseLoginActivity.TWITTER_LOGIN_ENABLED"-->
        <!--android:value="true"/>-->
</activity>

...and:

<meta-data
    android:name="com.parse.APPLICATION_ID"
    android:value="@string/parse_app_id" />
<meta-data
    android:name="com.parse.CLIENT_KEY"
    android:value="@string/parse_client_key" />
<meta-data
    android:name="com.facebook.sdk.ApplicationId"
    android:value="@string/facebook_app_id"/>

In my GlobalApplication class, I have:

ParseFacebookUtils.initialize(this);

I realize this looks like a hash key problem, but I've tried hashing and re-hashing using various methods found here: Key hash for Android-Facebook app

I'm hoping it's not something as trivial as messing up my hash keys, because I've triple checked these. Is there something wrong with my code?

What is the problem here? See attached image below:

enter image description here
(source: elgami.com)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
  • 1
    Your code snippets look fine so this doesn't seem to be an implementation issue. Are you using Android Studio? If so, keep in mind that Android Studio uses its own keystore for debug builds and doesn't use the one in the Android SDK folder. You can also use the Build > Generate signed APK option to specify a keystore to use. – subeeshb Jun 19 '15 at 06:48
  • Yes. I'm using Android Studio. I wasn't aware of that. I was using the debug key in my Java JDK folder. How would I go about signing a debug key using Android Studio? – drearypanoramic Jun 26 '15 at 20:32

1 Answers1

0

I figured it out! Hopefully this helps others as well. There was nothing wrong with the way I generated the hash keys. I just wasn't using a signed release build while testing for the Facebook hash. Make sure you generate a signed APK, copy the APK into your phone and install it, then open the app. When you attempt to login with Facebook you will still see the error, but displayed will be the correct hash key, and you will want to add this exact value into your Facebook app dashboard as your production hash!