Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Connect to Facebook Problem Android

Discussion in 'Editor & General Support' started by Nihil688, Jul 26, 2014.

  1. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    Hello all, I am having this problem with an app I am about to release. We are at the testing phase and Ive been using Prime31 plugins to connect and post to Facebook. Now my code works for all iOS and most of Android phones apart from:
    Samsung Nexus 10, 4.4.2,
    HTC One M8 – Android 4.4.2
    Sony Xperia Z – Android 4.1.2
    HTC One S - Android 4.1.1

    The error is either:
    - Invalid key hash. The key has ___ does not match any stored key hashes. Configure your app key hashes at facebook ( but this can't be as it's working fine on so many other devices )
    - Error loading Page: Please use your browser's back button to try again, or close this window.

    And also when control is returned to the app I don't get any event callbacks, neither success or failure. Any ideas whether these devices are circumstantial due to the app not being released or could there be something special about them?
     
  2. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    Do androids require anything in particular for facebook?
     
  3. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
  4. michael-ltn

    michael-ltn

    Joined:
    Feb 21, 2013
    Posts:
    4
    Glad I'm not the only one. Can you be more specific about how you were able to "disable their autoconfig"? Is this something you're doing in the project or on the facebook dev portal?
     
    Stream likes this.
  5. Stream

    Stream

    Joined:
    Oct 28, 2013
    Posts:
    37
    How do you fix this problem?
     
  6. boggart

    boggart

    Joined:
    Jun 17, 2013
    Posts:
    4
    Same problem. Link broken.
     
  7. Sagnik

    Sagnik

    Joined:
    Feb 19, 2015
    Posts:
    2
    i was dealing with this keyhash problem for over a day.......but what worked for me was that .........while on my Android Device with the signed application running ..........with the wrong keyhash put up in developers.facebook.com.......i tried to login and then i got an error message in the Facebook App saying that ...............The "<the real keyhash>" doesn't exit ...........so what i did was just adding the prompted keyhash in the Facebook App dealt with the problem.......now everything works like a charm
     
  8. LucianBase

    LucianBase

    Joined:
    Dec 22, 2016
    Posts:
    1
    This is how i solved this problem

    Download your APK to your PC in java jdk\bin folder

    in my case C:\Program Files\Java\jdk1.7.0_121\bin

    go to java jdk\bin folder and run cmd then
    copy the following command in your cmd

    keytool -list -printcert -jarfile yourapkname.apk

    Copy the SHA1 value to your clip board
    like this CD:A1:EA:A3:5C:5C:68:FB:FA:0A:6B:E5:5A:72:64:DD:26:8D:44:84
    and open http://tomeko.net/online_tools/hex_to_base64.php to convert your SHA1 value to base64.
    This is what Facebook requires
    get the generated hash " ********************= " and copy the key hash to the facebook app.
     
  9. MANA3DGames

    MANA3DGames

    Joined:
    Jun 13, 2015
    Posts:
    1
    Worked! ... Thanks a lot LucianBase.
     
  10. Dannark

    Dannark

    Joined:
    Jul 24, 2016
    Posts:
    14
    Amazing, it did the trick! the hash KEY give in android was a bit different than the one in this website, actually i could not notice the difference between them lol, But the key from this website WORKED - 2017