Getting Android key hash for trigger.io facebook module

The trigger.io documentation for your Facebook module has a tip for getting your Android key hash for upload to Facebook:

On Android, the hash of the key used to sign your application requires Facebook to confirm that your application must have access to the Facebook API. The easiest way to configure this is to just start using the Facebook API, any API methods will return an error message that includes a hash and a URL to configure it.

Is there any example code that should generate this error containing a hash? Or another way to get a hash?

I managed to get an authentication error if I install the Facebook application on a simulator, but it does not return a key hash.

I looked at the official Android docs, but it looks like there should be a file called ~/.android/debug.keystore , but trigger.io should put this file in a different place (or put it at its end for remote assembly).

+4
source share
4 answers

You should see the hash needed to display the log when the application is launched through the Toolkit, I do not think that it accesses the callback with an error, since it is directly downloaded from the Facebook SDK (documents can be clear about this).

If you want your hands to be directly in the keystore, the toolkit can be found in .template/lib/debug.keystore in the folder of your applications, you can also specify your own keystore in the local settings tab in the Toolkit.

+3
source

I did not get a hash registered either until I tried to put a dummy hash key in my Facebook app settings.

After that, I added this error callback to my login function:

 function (err) { forge.logging.info(err); } 

And then Facebook said that my hash does not match the one that was provided by my application, and gave me the correct hash in the log.

+1
source

Trigger.io introduced the new forge.facebook.getKeyHash(success, error) method to easily get a software hash programmatically. The new method is available in Facebook Module v2.11 and higher .

+1
source

Go to the application directory Trigger.io and run keytool -exportcert -alias androiddebugkey -keystore .template/lib/debug.keystore | openssl sha1 -binary | openssl base64 keytool -exportcert -alias androiddebugkey -keystore .template/lib/debug.keystore | openssl sha1 -binary | openssl base64

If you are prompted for a keystore password, do not enter anything, just press Enter.

0
source

All Articles