Weird FB Bug with Signed APK

Hi,

I integrated FB SDK and sharing was working awesome with the debug builds… But when I make a release build with the following command

cocos deploy -p android -m release

The FB sharing seizes working… Nothing happens when I tap the button that invokes FB sharing… What could be the problem? Any help??

Thanks for reporting this issue, we will have a test today

I test the command
cocos deploy -p android -m release

it’s workding as expect

when you pack your app, you need input a release keystore,
may be you forget to add the hash key into the facebook developer app setting.

you can use the debut key try again.

Yeah… I missed adding the hash key of release.keystore to facebook developer dashboard. Now added it, but still not working…

I created the release hash key as given in the following URL: http://stackoverflow.com/questions/5803944/find-the-key-hash-for-a-signed-app

and updated in FB Developer Dashboard at https://developers.facebook.com/apps/

What else am I missing !!

Cocos2dx logs dont show up in adb logcat with the release build. Any way to enable logging in release mode, so I can try debug what’s going on in the code, in release mode?

Upgraded cocos2d-x version to new 3.1 to see if it resolves the issues…

Followed the same guide @ http://www.cocos2d-x.org/docs/manual/framework/html5/facebook-sdk/facebook-sdk-on-android/en to enable FB.

But now error happens in debug mode itself… On the line where i call plugin.FacebookAgent.getInstance().isLoggedIn(function(code, response){}), I am getting the following error in logcat:

D/cocos2d-x debug info( 9241): JS: assets/src/HUDLayer.js:180:Error: js_pluginx_protocols_FacebookAgent_isLoggedIn : wrong number of arguments: 1, was expecting 0

Ah, we refactored the API. isLoggedIn is now synchronized function, you get the result directly:

http://www.cocos2d-x.org/docs/manual/framework/html5/facebook-sdk/api-reference/isloggedin

1 Like

Hi,

I am using cocos2dx js v3.3 now. But the same issue happens. In the debug mode, facebook sharing works fine, but in release mode, its not happening.

I also generated the release keystore hash with the following command

keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64

and updated it at Key Hashes field of
https://developers.facebook.com/apps/*****/settings/

What could be the problem?

Bump. Any clues?

Any help please :smile:

Help, there is any solution?