Android Facebook SDK FacebookDialog.shareDialogBuilder doesn't show my description

后端 未结 1 1440
盖世英雄少女心
盖世英雄少女心 2021-01-14 07:11

I\'m using the Facebook Android SDK to post a share from my Android app, setting the link to the Google Play url but I want to fill in my own description to be displayed. M

相关标签:
1条回答
  • 2021-01-14 07:53

    I use Facebook SDK 4.0 and this method works fine

    if (ShareDialog.canShow(ShareLinkContent.class)) {
    
                            ShareLinkContent linkContent = new ShareLinkContent.Builder()
                                    .setContentTitle(getString(R.string.share_onfacebook_title))
                                    .setContentDescription(
                                            getString(R.string.share_onfacebook_message))
                                    .setContentUrl(Uri.parse(getString(R.string.share_onfacebook_url)))
                                    .setImageUrl(Uri.parse(getString(R.string.share_onfacebook_image_url)))
                                    .build();
    
                            shareDialog.show(linkContent);
                        }
    
    0 讨论(0)
提交回复
热议问题