2017-11-09 13 views
2

は、だから私は招待ダイアログを表示するようにreact-native-fbsdkFBAppInviteDialogを使用しようとしていますダイアログのエラーを誘うが、私はいつも私がSending App Invites in a React Native app反応するネイティブ・fbsdkアプリは

からこのコードを使用しようとしていた

error

このエラーを取得しますあなたがしたい場合

は、ここに私のコード

constructor (props) { 
    super(props) 

    this.state = { 
     appInviteContent: { 
     applinkUrl: 'https://facebook.com' 
     } 
    } 
    } 
    _onPress =() => { 
    var tmp = this 
    AppInviteDialog.canShow(this.state.appInviteContent).then(
     function (canShow) { 
     if (canShow) { 
      return AppInviteDialog.show(tmp.state.appInviteContent) 
     } 
     } 
    ).then(
     function (result) { 
     if (result.isCancelled) { 
      Alert.alert('Share cancelled') 
     } else { 
      Alert.alert('Share success with postId: ' + result.postId) 
     } 
     }, 
     function (error) { 
     Alert.alert('Share fail with error: ' + error) 
     } 
    ) 
    } 

答えて

0

であるshowDialog WOR私はあなたがflow言語を使用しているコードにそちらを参照してくださいとしても

appInviteContent= { contentType: 'link', contentUrl: Platform.select({ ios: 'https://iossomething.com', android: 'https://androidsomething.com'}), contentDescription: 'Check the website!', };

:KSあなたが最初の例として、このような何かを示さなければなりません。 を確認してください。

関連する問題