I have integrated facebook with my app and it is running fine locally. When i deploy my app after that facebook feature not working showing toast "Unable to authorize facebook. Please try again". Please let me know if anything special need to be done while deploying on play store or any configuration change.
-
Is this not work for only your account or many more account also ? – Dhaval Solanki Feb 07 '17 at 04:42
5 Answers
You need to generate key with your release keystore and add that key to your facebook app.
- 1,140
- 3
- 20
- 39
-
-
I generated new release key and paste it on my facebook developer account. But still got the same issue. Do i need to deploy new apk on play store to take effect ? – Hassan Munir Feb 07 '17 at 05:49
You have require to set signed SHA key in your facebook developer console, you can directly generate signed and unsigned SHA using following code,
try {
Logger.print("=" + getPackageName());
PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Logger.print("KeyHash:" + Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
} catch (PackageManager.NameNotFoundException | NoSuchAlgorithmException e) {
e.printStackTrace();
}
For the signed SHA install signed apk in your device and check log and unsigned install debug apk and check Log.
- 4,589
- 1
- 23
- 39
you need to generate the release key(facebook api key) for release version..!!
- 47
- 11
-
I generated new release key and paste it on my facebook developer account. But still got the same issue. Do i need to deploy new apk on play store to take effect ? – Hassan Munir Feb 07 '17 at 05:49
After deploying to play store its not working at my side.i am getting my new key hash from logcat and then this add to facebook developer account then it working fine at my side.we are getting debug key and after generating signed apk we have to add this to facebook developer.you can get the key logcat with simple steps.Hope this helps.:)
- 689
- 1
- 6
- 17
You should make your app as public so
STEP 1:
Login to facebook Developer Account -> Your App
In Settings -> Basic -> Contact Email. (Give any email)
STEP 2:
And in 'App Review' Tab : change
Make (name of your app) public?
make it as yes

put this as yes
- 1
- 1
- 6,755
- 4
- 38
- 57