I have a text in my android application and I want the user to be able to click the FB Share button in the app and get this text posted on their own wall.
So far I've been following this tutorial:
https://developers.facebook.com/docs/android/share
and it is only good for either sharing a link (I dont want to share a link) or bringing up the share status dialog, but it is empty.
how can I populate that dialog with the text I want to populate it with?
this is my code
private void shareOnFacebook(String textToBeShared) {
if (FacebookDialog.canPresentShareDialog(a, FacebookDialog.ShareDialogFeature.SHARE_DIALOG)) {
// Publish the post using the Share Dialog
FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(a).setCaption(textToBeShared).build();
a.uiHelper.trackPendingDialogCall(shareDialog.present());
} else {
publishFeedDialog();
}
} // End of shareOnFacebook
I tried with setLink(null).setDescription, setName, setCaption but none of those worked.