Question

Firstly I want to say I search more than 1 week about this but I ve not found the solution what I need.

My simple target : I want to login facebook with my android app.

What I did : I found many sample to login facebook and I tried all of them.(I give codes which belongs to one of them) I create developer facebook account. And I add platform for android. It gives me App ID and secret. And I generate key hash in two methods(I have same the key hash for two of them) :

1.

$ keytool -exportcert -alias androiddebugkey -keystore "C:\Documents and Settings\Administrator.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64

2.

PackageInfo info;
try {
    info = getPackageManager().getPackageInfo("com.you.name", PackageManager.GET_SIGNATURES);
    for (Signature signature : info.signatures) {
        MessageDigest md;
        md = MessageDigest.getInstance("SHA");
        md.update(signature.toByteArray());
        String something = new String(Base64.encode(md.digest(), 0));
        //String something = new String(Base64.encodeBytes(md.digest()));
        Log.e("hash key", something);
    }
} catch (NameNotFoundException e1) {
    Log.e("name not found", e1.toString());
} catch (NoSuchAlgorithmException e) {
    Log.e("no such an algorithm", e.toString());
} catch (Exception e) {
    Log.e("exception", e.toString());
}

And I have the key hash like this :

6R5************hZZbeBU=

the last char is '=' I write all of chars to the facebook app settings, And I write my APP_ID to my android project.

What is the problem : The problem which I see on the all of my projects , is the same. problem is I connect facebook with my account which the creator of the APP_ID . I mean When I login with my account I connect yes I also post,see my friends , upload photo ,,, but when I login to my app with different account I can t login.open just empty white page like this: enter image description here

Actually I do not understand this and the more interesting thing is , when I download different android facebook projects I try them. And sure , I copy my app_id and again I connect facebook but different accounts I did not success to connect facebook.

What is the problem ? Should I do something on Facebook side like give permission or something else...

thanks,,,

Was it helpful?

Solution

You need to make your Facebook App Live from Sandbox mode.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top