[SOLVED] Info.text missing in facebook

Hello Developers,

I am facing a strange issue.
I am using facebook link from SDKBOX like as under -

void SplashScene::onShareLink()
{
    int score = UserDefault::getInstance()->getIntegerForKey("best_Score", 0);
    std::stringstream ss;
    ss << "I just scored " << score << " on Angry Alligator.";
    
    std::string downloadlink = "";
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
    downloadlink  = "https://itunes.apple.com/us/app/angry-alligator/id954188113?ls=1&mt=8";
#else
    downloadlink  = "https://play.google.com/store/apps/details?id=com.huhustudio.angryalligator&hl=en";
#endif
    sdkbox::FBShareInfo info;
    info.type  = sdkbox::FB_LINK;
    info.link  = downloadlink;
    info.title = "Angry Alligator";
    info.text  = ss.str().c_str();
    info.image = "https://lh3.googleusercontent.com/-5FNWdUYjxdg/VhKLNpCkdFI/AAAAAAAAB30/DWkZXlQ_8ss/s152-no/icon_fb.png";
    sdkbox::PluginFacebook::dialog(info);
}

The share image on the device looks like this -

But the facebook wall is missing the shared info.text

can anyone help with thisā€¦ ??

@pabitrapadhy - can you run this sample: https://github.com/chukong/sdkbox-facebook-sample
and does it post to your wall the way you expect?

Hi @slackmoehrle

Thanks for replying.
However, later I came to know that this is because of a facebook policy as under for sharing :smile:

Note: If your app share links to the iTunes or Google Play stores, we do not post any images or descriptions that you specify in the share. Instead we post some app information we scrape from the app store directly with the Webcrawler. This may not include images. To preview a link share to iTunes or Google Play, enter your URL into the URL Debugger.

As my link contains redirection to playstore and appstore based on device, so it was not working. I tried to cheat them using url shortener. But they are betterā€¦ ha haā€¦ :smile:

Do you think prefilling the title will have problems with Facebookā€™s app review?

Iā€™m trying a similar thing and noticed that the user.info wasnā€™t included but the title worked well. So Iā€™m putting ā€˜I reached level xxx of mygameā€™ as a title, with the link to google play. Iā€™m wondering if theyā€™ll take a dislike to that though (since it doesnā€™t describe the content of the destination)

hi @nikcain

Thereā€™s always some kind of work around.
what I did is I gave a Facebook page link of the app publisher and it has a link to redirect to the appropriate app store.

However thereā€™s no catch with what you have mentioned. you could try that too.

Hello guys,

Actually I found the solution today once my game is released.
I gave the link as a facebook page for the game.

During development (even with the release build) we will not be able to see any prefilled text. But, once the app is launched by playstore we will be able to.

Attached is the screenshot.

I hope this helps others.
But implementing Facebook with SDKBOX for this was cool.

Happy Coding :smile:

1 Like

Hi all,

I used example code to share FB link.
Here while sharing only iā€™m unable to see info.text

code:
sdkbox::FBShareInfo info;
info.type = sdkbox::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ā€;
sdkbox::PluginFacebook::dialog(info);

Iā€™m checking in test app and not getting any text(info.text).

Any changes in FB share, please let me know??

Facebook will pull data from your URL, you can use this debugger to test the share result.

https://developers.facebook.com/tools/debug/

so, it is not possible to specify info.text for dialog ? Or is it possible to put that text into URL ?

no, it couldnā€™t .

info.text is only useful for images.