android - error while adding development keyhash in developer.facebook.com -
i making demo app integrating facebook sso , made debug keyhash login via facebook when adding development keyhash in facebook developers site asking me release keyhash @ same time , dont want upload demo playstore , not allowing me finish process.
please suggest me can proceed.
public void generatehashkeyforfacebook(context context) throws exception { try { packageinfo info = context.getpackagemanager().getpackageinfo("com.yourpackagename", packagemanager.get_signatures); (signature signature : info.signatures) { messagedigest md = messagedigest.getinstance("sha"); md.update(signature.tobytearray()); log.d("fbkeyhash >>> ", base64.encodetostring(md.digest(), base64.default)); } } catch (packagemanager.namenotfoundexception e) { e.printstacktrace(); } catch (nosuchalgorithmexception e) { e.printstacktrace(); } }
just put function activity , see log cat obtaining hash key below link https://developers.facebook.com/docs/android/getting-started
Comments
Post a Comment