1
所以這是我的應用程序代碼的邀請:Facebook應用程序邀請的iOS SDK無法顯示邀請VC
private func inviteFriends() {
let content = FBSDKAppInviteContent()
content.appLinkURL = URL(string: "...")
content.appInvitePreviewImageURL = URL(string: "...")
FBSDKAppInviteDialog.show(from: self, with: content, delegate: nil)
}
此代碼工作正常,但如果我嘗試添加促銷代碼:
private func inviteFriends() {
let content = FBSDKAppInviteContent()
content.appLinkURL = URL(string: "...")
content.appInvitePreviewImageURL = URL(string: "...")
content.promotionCode = "preview"
content.promotionText = "Use the *preview* code to unlock the app"
FBSDKAppInviteDialog.show(from: self, with: content, delegate: nil)
}
邀請VC不再顯示(該函數被調用,但沒有顯示)。我在這裏錯過了什麼?
你試過初始化FBSDKAppInviteDialog對象,然後調用這個節目? –
不,我只是試圖按照這個:https://developers.facebook.com/docs/app-invites/ios – Chlebta