简体   繁体   中英

Facebook share description is not shown when on my wall

I am using this code to share user achievements on my app

    if (FacebookDialog.canPresentShareDialog(getApplicationContext(), 
        FacebookDialog.ShareDialogFeature.SHARE_DIALOG)) {

        // Publish the post using the Share Dialog
        try {
            FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(this)
            .setApplicationName(getString(R.string.fb_app_name))
            .setName(parameters.getString("name"))
            .setCaption(parameters.getString("caption"))
            .setDescription(parameters.getString("description"))
            .setLink(parameters.getString("link"))
            .setPicture(parameters.getString("picture"))
            .build();
            uiHelper.trackPendingDialogCall(shareDialog.present());
        } catch (JSONException e) {
            e.printStackTrace();
        }

when I am setting the "link" to my app Google Play link after share only content of Google Play link shown on my wall (It looks like I shared the app link), but if I am also want to see "caption" and "description".

How to share a story from my app with some story + link of my app? Thanks in Advance

I think, that we haven't got the opportunities to solve this. Official Facebook docs says:

'If your app share contains a link to any app on Google Play or the App Store, the description and image included in the share will be ignored. Instead, we will scrape the store directly for that app's title and image (and if there is no image, the share won't include one).'

看来原因是Google的某些限制,不允许共享Google Play链接并提供您自己的描述等。解决方案可能是将Google Play的链接放在共享消息中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM