Generating key Hash (required on Android only)
If you are reading this, it means that you are trying the Facebook SDK ANE on Android. if you are using it for iOS, you can skip this part because generating key Hash is only required on Android. if you want to know more about the key Hash, read here https://developers.facebook.com/docs/android/getting-started#create_hash.
There are two methods to get the key hash from your project but we go with the easy approach using the ANE directly. you see, after your set your Facebook app in the Facebook developer console as explained in part 2 of these tutorials, there’s a key Hash input field in the Android platform and you need to fill it correctly if you want your Android app to correctly connect to the Facebook app.
in the Facebook ANE API, we have built a property called hashKey which you can use to generate your unique Hash key string. it’s important to know that this string is generated based on your .p12 certificate which means it will be different if you are building in debug or release mode if you have separated .p12 certificates for each mode. The good news is that you can add both your debug and release Hash key strings in your Facebook developer console. (If you are building on FlashDevelop you usually will have only one .p12 certificate but if you are building on FlashBuilder, you will need to generate this Hash key twice. one for your debug mode while you are building your app and one after you are getting ready for the release version.)
Getting the key Hash is so easy. simply initialize the extension and get the string from hashKey
FB.getInstance("000000000000000"); // your Facebook app ID
trace("key Hash = ", FB.hashKey);
That’s all! copy this String to your Facebook developer console and enter it in the Hash key input text field and save the page. Now you are ready to use the SDK.