status update from android app not showing the ContentUri

I am working with Facebook SDK 4.1.2 for android. I need to share a specific post, containing a link in facebook from my app. I am using the ShareLinkContent variable. However, adding the ContentUri attribute does not result the auto generation of the post, i.e., the status field remains empty in the facebook window. Attaching the code fragment.

    ShareLinkContent content = new ShareLinkContent.Builder()
        .setContentUrl(Uri.parse("https://www.softwindtech.com"))
        .build();
        if (canPresentShareDialog) {
            shareDialog.show(content);
        } else if (profile != null && hasPublishPermission()) {
            ShareApi.share(content, shareCallback);
        } else {
            //pendingAction = PendingAction.POST_STATUS_UPDATE;
        }

Can anyone please help me with the instruction to settle this problem.


Source: facebook

Leave a Reply