I am using cocos2D-X v3.9, latest version of SDKBOX and FacebookPlugin.
I have no problem integrating the plugin using the installer. There was no errors given,
I have checked the documentation part on the Manual Integration of the plugin and everything seems to be in place.
I have also checked with the sample file that was on GitHub built with v3.7. Everything is identical other than the part where the latest version had the #ifdef SDKBOX_ENABLED part. I called the login function with a button attached with a touch listener event, exactly the same as the sample file given. I already set up my Facebook Dev account with a placeholder app, set up is all done on that side.
However on the app side, the login prompt just cannot seem to pop up. I tried in both debug and release mode and both doesn’t work. BUT the cool thing is that facebook actually recorded my login status and is recorded in the dashboard. I am going to attach an image later. The build log is almost identical to the one in the sample as well when I tried to built.
So right now, I am totally clueless as to why the login prompt did not pop up, or did it even login at all. I couldn’t tell.
But I have narrowed down a few ideas as to why:
-
I did not call FacebookPlugin::setListener(this), the reason why I cannot call this is because I cannot inherit FacebookPlugin::Listener in my main scene, due to #ifdef SDKBOX_ENABLED being there. The inheritance part cannot have “#” in it.
-
One other reason could be in the manual integration part of the documentation, be it in AndroidManifest.xml, Android.mk, Cocos2dxActivity.java, I dont know, but as I checked with the sample given, I found no issues in mine as both were pretty much identical.
-
Setup in Developer Facebook wasn’t completed properly, I added in both my debug and release hash keys already so I dont think that’s a problem. I don’t know where else could have caused a hiccup.
-
Final reason would be SDKBOX and cocos2d-X v3.9 has a major bug and it would cause it not to work. But then again I trust in you guys the devs, and I doubt that a newer update would not have fixed something from a lower version.
So I hope someone would enlighten me as to why my problem exists, even though I have pretty much tried every solution under my belt to try and fix it but it just doesn’t seem to be working. Meanwhile I would be posting my build log as an attachment.
Thanks for reading!
TLDR: cocos2d-x v3.9 is awesome, SDKBOX is awesome but FacebookPlugin doesnt have the login prompt. Checked with all kinds of sample projects and integration tutorial, found no diffrerences in files. The sample works great, I am able to login, but my own version does not. Anyone can help me?
cocos version: v3.9
SDKBOX and FacebookPlugin:: latest from SDKBOX.
Android OS Tested: Marshmallow and Jellybean.
BUILD LOG
Pastebin


