Android Facebook promotion says "Not found"

I am trying to share facebook function with link to google play. Its working well, except for 1 question. The main title on the message page says: "Not found"

Here is my code:

    if (FacebookDialog.canPresentShareDialog(this,
            FacebookDialog.ShareDialogFeature.SHARE_DIALOG)) {
        // Publish the post using the Share Dialog
        FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(this)
                .setDescription(getString(R.string.facebook_description))
                .setPicture(getString(R.string.facebook_picture))
                .setLink(getString(R.string.url_google_play) + getPackageName())
                .build();
        uiHelper.trackPendingDialogCall(shareDialog.present());

    }

And here is the result:

https://www.dropbox.com/s/ylx5zo265yjg66i/Screenshot_2014-05-14-16-35-04.png

At first it seemed to me that I needed to set setCaption, but that seems to break things - I don't get the link or icon at all!

Did I miss something? I went through the documents again and again.

thank

0
source share
1 answer

Try to add

.setApplicationName (") .setName (" test: ")

FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(this)
                    .setApplicationName("<app name>")
                    .setName("test:")
                    .setCaption(caption)

                    .setDescription(getString(R.string.facebook_description))
                    .setPicture(getString(R.string.facebook_picture))
                    .setLink(getString(R.string.url_google_play) + getPackageName())
                    .build();
+1

Source: https://habr.com/ru/post/1540942/


All Articles