Typescript ngx facebook npm包';s ui mathod承诺永远不会解决或拒绝

Typescript ngx facebook npm包';s ui mathod承诺永远不会解决或拒绝,typescript,angular6,Typescript,Angular6,在我的angular 6项目中,我正在使用ngx facebook软件包登录并共享facebook。登录工作正常,但当我要在Facebook上共享帖子时,成功共享后,弹出的ui不会关闭。我检查了问题,得到了回调。然后()或.catch()mathod从未调用过。这是我的密码- export class MyClass(){ constructor( @Inject(WINDOW) private window: Window, private fb: FacebookSer

在我的angular 6项目中,我正在使用ngx facebook软件包登录并共享facebook。登录工作正常,但当我要在Facebook上共享帖子时,成功共享后,弹出的ui不会关闭。我检查了问题,得到了回调。然后()或.catch()mathod从未调用过。这是我的密码-

export class MyClass(){
  constructor(
     @Inject(WINDOW) private window: Window,
    private fb: FacebookService, 
 ) {
    const initParams: InitParams = {
      status: true,
      cookie: true,
      xfbml: true,
      version: 'v2.10'
    };
    fb.init(initParams);
  }
  shareOnFb(options : any) {
    return new Promise((resolve, reject) => {
      const newOption: UIParams = {
        method: 'share',
        href: options.href,
        redirect_uri: 'https://myUrl.com/404#confirm'
      };
      this.fb.ui(newOption)
      .then((res: UIResponse) => {
        if (res.error_message) {
          this.toastrService.error('failed');
          reject();
        } else {
          resolve(true);
        }
      }).catch((e : any) => {
          reject();
      });
    }
}
}