Question

I use the Facebook SDK to provide a facebook login in my new app. Debugging my program everything worked fine so I finally uploaded my app on the Android market. Now, I have just downloaded my app and the login does not work. If I try again running the app on Eclipse, everthing all right.

Do you know how to solve this strange problem? I use the same smartphone to debug and to download/use the app from the marked.

This is my code.. it is the "standard" code that I have seen in several discussions:

Session.openActiveSession(getApplicationContext(), true, new Session.StatusCallback() {
  public void call(Session session, SessionState state, Exception exception) {
    if (session.isOpened()) {
      Request.executeMeRequestAsync(session, new Request.GraphUserCallback() {                  
        public void onCompleted(GraphUser user, Response response) {
           if (user != null){  
...

Thank you in advance.

Was it helpful?

Solution

My guess would bet that you entered to your Facebook app settings only the keystore of your debugging key. If that's the case, add your keyhash from the signer keystore, not the default one that Eclipse/ Android studio uses.

check THIS out for more info

OTHER TIPS

To solve this issue you have to add the HASHKEY generated from the keystore file which you used to sign the android application to upload on Google Play and make ensure you are using correct APPID and entered correct package name on the facebook developer account.

Use the correct openssl package to get the HASHKEY.

Add that HASHKEY on the facebook developer account then it will work

To generate the HASHKEY from the command prompt

See this thread Key hash for Android-Facebook app

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