2
그래서 내가 초대 대화 상자를 보여 react-native-fbsdkFBAppInviteDialog
를 사용하는 것을 시도하고 대화 오류를 초대하지만, 난 항상 Sending App Invites in a React Native app반응 - 네이티브 fbsdk의 응용 프로그램은
이 오류를 얻을 당신이 원하는 경우
여기 내 코드
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)
}
)
}