SDKBOX Facebook Share throws 'invalid href parameter' error on Android in Browser but not in App!

SDKBOX Facebook Share throws 'invalid href parameter' error on Android in Browser but not in App!
0

Hiya,

We are using the latest version of the SDKBOX Share/Facebook plugins.
On iOS, sharing seems to work fine.
On Android, sharing works fine as long as you have the App installed.
On Android, if you uninstall the app, sharing redirects to the browser instead and gives this error:

Could you confirm or look into this?

This is the event we’re trying to share:

                sdkbox::FBShareInfo info;
                info.type  = sdkbox::FB_LINK;
                info.link  = "http://www.ourcompany.com/apps/ourapp?utm_source=facebook&utm_campaign=ourapp_facebook_share&utm_medium=social&utm_content=ourapp_event_share&value=" + printf("%d", Manager::getInstance()->getValue());
                info.title = TextUtils::format2("Our Title Text: %i", Manager::getInstance()->getValue());
                info.text  = "Our Text";
                info.image = "https://static.ourwebsite.com/images/share/ourapp-facebook-share.jpg";
                sdkbox::PluginFacebook::dialog(info);

@yinjimmy can help with this.

plz check the info.link .

my test case:

    FBShareInfo info;
    info.type  = FB_LINK;
    info.link  = "http://www.cocos2d-x.org";
    info.title = "cocos2d-x";
    info.text  = "Best Game Engine";
    info.image = "http://cocos2d-x.org/images/logo.png";

works with app installed or not.


whats info.link = "http...value=" + printf("%d", Manager::getInstance()->getValue()); means ?

printf("%d", 3) = 1
printf("%d", 33) = 2
printf("%d", 333) = 3

I guess you want :

link = StringUtils::format("http...value=%d", Manager::getInstance()->getValue());

I confirmed your test share was working and I decided to use one of our own textformatters instead of the printf now, but it is in essence the same as your suggestion. Not sure why it said printf and why I was reading over it haha. :man_facepalming:

But I’m still not sure why the old method worked in the facebook app but not in the facebook website. It should in theory still form a valid url.

Anyway, the issue is solved so this ‘problem’ can be considered closed. :slight_smile: