Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Always getting Session state:CLOSED_LOGIN_FAILED, token:{AccessToken token:ACCESS_TOKEN_REMOVED in facebook android sdk3.0.

Always getting Session state:CLOSED_LOGIN_FAILED, token:{AccessToken token:ACCESS_TOKEN_REMOVED in facebook android sdk3.0. Even when i run the examples given by the facebook sdk its authenticating and not redirecting it to next flow.it displays the previous page itself.

like image 776
kumar Avatar asked Jan 31 '13 08:01

kumar


1 Answers

For some reason, the hash that the keytool is generating for me isn't the same as my app. This is what worked for me. Generate a hash using the standard code provided by facebook:

PackageInfo info = getPackageManager().getPackageInfo("<your_package_name>",  PackageManager.GET_SIGNATURES);  for (Signature signature : info.signatures)     {         MessageDigest md = MessageDigest.getInstance("SHA");         md.update(signature.toByteArray());         Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));     } 

Make sure to replace "your_package_name>" with your corresponding package name. Look at logcat and grab the keyhash and enter it in your facebook app settings.

like image 65
Karim Varela Avatar answered Oct 11 '22 22:10

Karim Varela