使用共享链接内容共享图像时,帖子ID为空

时间:2017-06-12 06:42:34

标签: facebook

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将非常感谢

0 个答案:

没有答案