[SOLVED] Info.text missing in facebook

[SOLVED] Info.text missing in facebook
0.0 0

#1

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… ??


Not sure I'm sharing a link correctly
[SOLVED] Saving user highScore with Facebook
#2

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


#3

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:


#4

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)


#5

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.


#6

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:


#7

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??


#8

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

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


#9

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


#10

no, it couldn’t .


#11

info.text is only useful for images.