来自 ShareDialog 的 react-native postId null

问题描述

我正在使用 react-native-fbsdk {ShareDialog} 在 Facebook 上发布我的提要,但 ShareDialog 没有返回帖子 ID,在我的情况下它始终为空。

enter image description here

我的导入

import { ShareDialog,LoginManager,Accesstoken,LoginButton } from "react-native-fbsdk";

这是我的代码

const shareLinkContent = {
  contentType: 'link',contentUrl: 'https://www.niofox.com/',contentDescription: 'Test Sharing Description'
};
var tmp = this;
ShareDialog.canShow(shareLinkContent).then(
  (canShow) => {
    if (canShow) {
      return ShareDialog.show(shareLinkContent);
    }
  }
).then(
  (result) => {
    if (result.isCancelled) {
      alert('Share cancelled');
    } else {
      alert('Share success with postId: ' + JSON.stringify(result));
    }
  },(error) => {
    alert('Share fail with error: ' + error);
  }
);

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)