[SOLVED]Crash sdkbox.PluginFacebook.inviteFriends + CreatorV1.8.1 + FacebookPluginsV2.3.17.7 + android

when i click Invite, show a warning “Missing App Link URL”.

Here is how i call the function , anything wrong?

onBtnInvite(){
        sdkbox.PluginFacebook.inviteFriends(
        "https://fb.me/481521932223209",
        "http://www.cocos2d-x.org/attachments/801/cocos2dx_portrait.png");
    },

I try to call requestInvitableFriends function , but it doesn’t invoke.

01-29 11:27:08.566: D/jswrapper(11735): JS: onBtnInvitableFriends
01-29 11:27:08.566: E/jswrapper(11735): [ERROR] Failed to invoke js_PluginFacebookJS_PluginFacebook_requestInvitableFriends, location: E:/games/fish_client/trunk/FishGame/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/jni/../../../Classes/PluginFacebookJSHelper.cpp:427

Can i realy use sdkbox.PluginFacebook.inviteFriendsWithInviteIds function to invite friend?
I don’t find the sample on the JS demo.

sdkbox.PluginFacebook.requestInvitableFriends({});

UPDATE: An other solution is make onInviteFriendsResult as a empty function:

virtual void onInviteFriendsResult(bool ok, const std::string& msg)
{
}

With the release of the Facebook SDK version 4.28.0, App Invites is deprecated. It will be supported until February 5, 2018.

What’s the Facebook suggestion? I can not find the answer on Facebook’s doc.

Find an answer here and https://blog.getsocial.im/facebook-deprecates-app-invites-are-you-ready/.

So bad if make the function empty,i can’t callback my own function when it success.BTW i just use sdkbox.PluginFacebook.inviteFriendsWithInviteIds and it make crash in onInviteFriendsResult too.
so strange about this function.:joy:

01-29 18:21:36.191: A/DEBUG(19181): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-29 18:21:36.192: A/DEBUG(19181): Build fingerprint: 'google/angler/angler:8.1.0/OPM3.171019.013/4499252:user/release-keys'
01-29 18:21:36.192: A/DEBUG(19181): Revision: '0'
01-29 18:21:36.192: A/DEBUG(19181): ABI: 'arm'
01-29 18:21:36.192: A/DEBUG(19181): pid: 18834, tid: 18834, name: palmplay.domino  >>> com.ipalmplay.domino <<<
01-29 18:21:36.192: A/DEBUG(19181): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe24
01-29 18:21:36.192: A/DEBUG(19181): Cause: null pointer dereference
01-29 18:21:36.192: A/DEBUG(19181):     r0 00000000  r1 00000000  r2 00000000  r3 d956e888
01-29 18:21:36.192: A/DEBUG(19181):     r4 00000000  r5 ff87d6b8  r6 d63b5580  r7 d7f831b0
01-29 18:21:36.192: A/DEBUG(19181):     r8 00000000  r9 f34312a0  sl ff87d740  fp ff87d69c
01-29 18:21:36.192: A/DEBUG(19181):     ip d95509f4  sp ff87d668  lr d8508325  pc d8508328  cpsr 400d0030
01-29 18:21:36.196: A/DEBUG(19181): backtrace:
01-29 18:21:36.196: A/DEBUG(19181):     #00 pc 00c44328  /data/app/com.ipalmplay.domino-gYDyLUidYSBoRUuEDNopvw==/lib/arm/libcocos2djs.so
01-29 18:21:36.196: A/DEBUG(19181):     #01 pc 00c44379  /data/app/com.ipalmplay.domino-gYDyLUidYSBoRUuEDNopvw==/lib/arm/libcocos2djs.so
01-29 18:21:36.196: A/DEBUG(19181):     #02 pc 006bd8e0  /data/app/com.ipalmplay.domino-gYDyLUidYSBoRUuEDNopvw==/lib/arm/libcocos2djs.so (se::AutoHandleScope::AutoHandleScope()+36)
01-29 18:21:36.196: A/DEBUG(19181):     #03 pc 006bf1fc  /data/app/com.ipalmplay.domino-gYDyLUidYSBoRUuEDNopvw==/lib/arm/libcocos2djs.so (FacebookListenerJS::onInviteFriendsResult(bool, std::string const&)+76)
01-29 18:21:36.196: A/DEBUG(19181):     #04 pc 006d7f97  /data/app/com.ipalmplay.domino-gYDyLUidYSBoRUuEDNopvw==/lib/arm/libcocos2djs.so (Java_com_sdkbox_plugin_PluginFacebook_onInviteFriendsResult+54)
01-29 18:21:36.196: A/DEBUG(19181):     #05 pc 0002416d  /data/app/com.ipalmplay.domino-gYDyLUidYSBoRUuEDNopvw==/oat/arm/base.odex (offset 0x21000)

I tested all function in debug mode before. I’ll test in release mode .

PluginFacebookJSHelper.cpp (24.9 KB)

I rewrite all the callback function. And no crash on my Android device, would u plz help to check it?

Roger that. I’ll check it later.

Check out function sdkbox.PluginFacebook.inviteFriendsWithInviteIds callBack success . It’s realy helpful and thank you.
Will you release it to facebookPlugins next version?:rofl:

1 Like

Thanks for your testing.
yes, and will release this week.