Android Facebook after build CoronaSDK 2013.1076

My understanding is you still need the keyhash.  FB’s just not telling you what it should be.

Has anyone found a solution to the Android issue of not being able to post anything?  I tried what @beckslash suggested on his other thread but it did not work for me.  Wanting to release my app this week, any other ideas of what we can do?

Hi @Mercury Media,

Which specific build of Corona are you using now? Mac or PC? We need this basic info to help diagnose the issue.

Thanks,

Brent

@rxmarccall Most likely it’s because the hash key is incorrect. As Rob Miracle said, you still need a valid hash key and Corona is no longer outputting it in the console. You have to generate it yourself like this:

keytool -exportcert -alias YOUR\_APP\_ALIAS -keystore YOUR\_KEYSTORE.keystore | openssl sha1 -binary | openssl base64

And enter your password for the keystore and not “android”.

I’ve noticed this problem only after I installed the Facebook app on my device. when I removed it, the popup vanished and the original facebook login page came back.

Hope this helps.

It’s the same for me.

Any workarounds jet?

Sure, kill Facebook… and I’m ready to throw the first stone :slight_smile:

LOL … you made my day!

@beckslash,

I am currently working on an update to an already live app.  I had a working android hash key already for my live app, shouldn’t this hash key still work with my updated app? Or do I have to create a new one?

If the hash was correctly generated there’s no reason to worry. You’ll sign the apk with the same certificate you generated the has in the first place.

In addition to Brent’s request, can you try and build the Facebook sample app?  The sample app shipping with all builds since 1076 should be working.

everything after 1076 till 1146 did not work producing the same error listed above.

Facebook now requests separate permissions for read and write.

We used 1076 which only supported asking permission once.

We will retry with the latest build.

Thank you.

Yea so the issue is just what others have reported of a weird Android pop up that asks if the user wants the app to be allowed on their facebook.  Click OK and nothing happens.  Works fine on IOS, not on Android.  Tried what you suggested with the “get Permissions” function and it still doesn’t ever post anything.  Might just be disabling facebook on my app for now seeing as there is no solution to this.

Using today’s daily build, I built the standard facebook sample app that we provide and it posted a photo to my timeline.  If you are having Facebook errors, please try and build the sample app, use your AppID. 

I think i solved the problem for my app.

It looks like i failed during the creation of the key hashes.

Let me try to make sure everyone understands this.    Facebook tries to detect if their native app is installed.  If it is, it uses it for SSO or Single Sign On.  Your app gets backgrounded, the native Facebook app launches and prompts you to login and agree to a set of permissions.  It then calls back to your app to bring it out of the background and let it know you’ve logged in correctly.

If you DO NOT have the native facebook app installed, it opens up a webView and tries to log you in through their web interface.  This is why you can make it work without the native app installed.

Why won’t it work with the native app installed?  Well its all about that big about being able to bring your app out of the background to the foreground and re-establish communications.  On Apple’s iOS they use a URL scheme to do it.  That’s why you have to put that bit in your build.settings  about “fbYOURAPPID” so that the native facebook app can restart you.

On Android, your stuff has to match in their portal at https://developers.facebook.com  See this screen shot:

fbsc.png

Your package name must match the package name that you’re building your APK with.  Your Key Hash is used to secure the login and it must match what your app is being built with.  In the past, you could provide FB a bogus key hash and they would spit out what they were expecting in the console log, but there are reports they are not longer doing that, so you have to make sure you get it right.

Thanks

Rob

I have everything set up like you have shown Rob, I have a hash that was used in my currently live app. I’m going to try and generate a new one just for fun to see if it fixes anything. However when I run the command given by beckslash, I get ‘openss’ is not a recognized command.

looks like your missing an L at the end of openss… it should be openssl not openss

@rob, yea that was a typo in my post, I have it correct in the prompt.  Do I need a special version of the Java sdk? Or should the one that Corona require work?

can you run the command:

which openssl

from the terminal command prompt and tell me what it says?