Hello,
I have troubles using Facebook:postPhoto on Android.
I successfully installed Facebook plugin within my app and all facebook features work on ios, and on android also excepted the postPhoto and dialog methods.
I use an Android studio exported project with facebook set up (I can connect to facebook and retrieve my friends list).
I finally managed to reproduce the issue with the facebook example gideros project (
https://github.com/gideros/gideros/tree/master/plugins/Facebook/examples/GiderosFacebook)
When I click on any of the buttons, my player crashes with this error:
http://pastebin.com/ecvTg2hjAs on android, the facebookbinder is precompiled, I cannot debug step by step what happens in the plugin.
Does anyone successfully uses this features from facebook on gideros android?
Any idea about what I could be doing wrong?
Thanks!
Comments
do you use facebook binaries provided with release?
What Android version is it on?
By the way, I noticed, that for some reason, I have two folders contining the .so
at the root of "bin/Android", I have armeabi, armeabi-v7 and x86 subfolders containing libfacebook.so
and another one "bin/Android/libs/" containing armeabi, armeabi-v7 and x86 subfolder for libFacebook.so.
I now remember that I used the libFacebook.so and renamed it to remove the upper case "F" but maybe it was a mistake.
I run my code on a Nexus 5 using Android 6.0.
When I use the libs with the correct name 'libfacebook.so", I cannot use it properly:
"main.lua:23: attempt to call method 'login' (a nil value)"
When I use the libFacebook files, I get the error presented above.
Maybe the two versions come from successive installs of Gideros on my computer.
Where could I find the right libfacebook.so files to double check them?
Thanks
they should be libfacebook.so instead, but that means you are using correct ones.
So the error is:
JNI DETECTED ERROR IN APPLICATION: the return type of CallObjectMethodV does not match void android.os.BaseBundle.putString(java.lang.String, java.lang.String)
The line that probably causes the problem:
https://github.com/gideros/gideros/blob/master/plugins/Facebook/source/Android/jni/gfacebook.cpp#L163
And as we see, we use CallObjectMethod, but instead we should have called CallVoidMethod, so yeah, it seems Android JNI become much more picky
but it is great that it provided much more comprehensible log, fixing it now
Could you provide me with an updated version of libfacebook.so?
I tried to add the jni files to my project but I got an "No such file or directory " for the include in gfacebook.h
Should I be able to add the JNI files to my project and build them directly?
I'm attaching them here, but the new release also should be soon, we are testing it right now.