public void onShareResult() {
if (ShareDialog.canShow(ShareLinkContent.class)) {
ShareLinkContent linkContent = new ShareLinkContent.Builder().setContentDescription("text")
setContentUrl(Uri.parse(campaignDeatilResponse.getLink()))
.setImageUrl(Uri.parse(campaignDeatilResponse.getFacebook().getUser_image()))
.build();
shareDialog.show(linkContent, ShareDialog.Mode.FEED);
shareDialog.registerCallback(callbackManager, new FacebookCallback<Sharer.Result>() {
@Override
public void onSuccess(final Sharer.Result result) {
Log.d("myPostId", "" + result.getPostId());
Log.e("result :", " " + new Gson().toJson(result));
}
@Override
public void onCancel() {
}
@Override
public void onError(FacebookException error) {
}
});
}
}
我正在使用此代码,并成功获得三个月的帖子ID,但现在从两天两天我得到帖子ID null.Any help将非常感谢