We now need to do is a export the signature for your app so that Facebook can use to ensure users are only communicating with your app on the Android. This is done by running the keytool. The following shows how to export the key for your app using the debug defaults specified by the Android SDK and Eclipse:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore
| openssl sha1 -binary
| openssl base64
This tool generates a string that must be registered in the Mobile & Devices section of the Developer App for your app
以上是从facebook官网上拷贝下来的
要生成key,有四个要素。
1.确保你的电脑安装了keytool 和openssl。
2.确保你是用下面这个命令,一点都不要错。
3.确保你的alias是正确的,因为即使错误,也不会报错。
4.确保你粘贴到facebook的时候,key没有粘贴错。
>keytool -exportcert -alias androiddebugkey -keystore debug.keystore |openssl sha1 -binary | openssl base64
确保将openssl里的bin文件夹路径加入系统路径变量里
然后确定文件夹位置到你的jdk/bin文件夹里
-keystore debug.keystore 其中debug.keystore默认生成在你的用户文件夹里