Skip to content Skip to sidebar Skip to footer

Signing Android App On Mac For Facebook App

I used to sign my apps on PC with keytool, and get the hashcode that is used in FB app. Now, I've switched to Mac, and I have to sign my app again. I've followed the procedure expl

Solution 1:

I am not a Mac user so won't be able to give you a solution specifically for a Mac, but I can give you something better and simpler.

I have posted a similar answer here: https://stackoverflow.com/a/13283088/450534. The second solution works regardless to the platform.

Give this a try. This is the exact same from the answer linked above.

I always found the simplest thing to do was, let the Facebook SDK tell you what your Hash Key is. This is by far more simpler and shouldn't take more than a couple of minutes.

Step 1: In your Facebook SDK, locate the Util.java class. In that, change this:

privatestaticbooleanENABLE_LOG=false;

to:

privatestaticbooleanENABLE_LOG=true;

Step 2: Create a new Signed APK, transfer to your device and install. If it is already installed, naturally, it will prompt.

Step 3: With your DDMS (Logcat) running and your device connected to the computer, run the application and keep looking for a key mismatch warning. That warning has the actual Hash Key. Copy that key, go to your Facebook Developer page and add the new key to the list.

You might also want to go through the comments from this answer of mine. https://stackoverflow.com/a/10516629/450534. In the third comment, the OP has posted the response in Logcat.

EDIT: The official Facebook Getting Started - Step 4 pages provides this command for generating a Key Hash on a Mac:

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

Post a Comment for "Signing Android App On Mac For Facebook App"