In my Android application I want to share text message using Facebook share dialog screen with pre populated text but I get only share dialog without pre populated text. For example I want to post the text "User wants this pop up..." but the Facebook share dialog does not show my message in the dialog.
My question is what should I need to get share dialog with my pre populated text?
I have tried the following code:
FacebookDialog shareDialog = new
FacebookDialog.ShareDialogBuilder(FShareActivity.this)
.setLink(msg_link)
.setCaption(msg_caption)
.setDescription(msg_description) // msg_description should be shown in share dialog screen & it is my pre populated text.
.setName(msg_name).build();
uiHelper.trackPendingDialogCall(shareDialog.present());
and also tried this method also
Bundle params = new Bundle();
params.putString("name", msg_name);
params.putString("caption", msg_caption);
params.putString("description", msg_caption);
params.putString("link", msg_link);
WebDialog feedDialog = (
new WebDialog.FeedDialogBuilder(getActivity(),
Session.getActiveSession(),
params))
.setOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(Bundle values,
FacebookException error) {
if (error == null) {
final String postId = values.getString("post_id");
if (postId != null) {
// success
} else {
// fail
}
}
}
})
.build();
feedDialog.show();
Please let me know Is it possible to show pre populated text in share dialog screen? if yes Please tell me what did I wrong?