My app uses a simple facebook login. I have entered the keyhash in my app dashboard, key_hash section and I was able to login successfully. Now I have published the app and
Here is the C# version for the benefit of anyone trying to get the Xamarin sample to work.
public void showHashKey(Context context)
{
try {
PackageInfo info = context.PackageManager.GetPackageInfo("com.facebook.samples.hellofacebook", PackageInfoFlags.Signatures);
foreach (Android.Content.PM.Signature signature in info.Signatures) {
MessageDigest md = MessageDigest.GetInstance("SHA");
md.Update(signature.ToByteArray());
var sign = Base64.EncodeToString(md.Digest(), Base64Flags.Default);
Log.Info("KeyHash:", sign);
}
Log..Info("KeyHash:", "****------------***");
} catch (PackageManager.NameNotFoundException e) {
e.PrintStackTrace();
} catch (NoSuchAlgorithmException e) {
e.PrintStackTrace();
}
}