Created
March 27, 2020 04:06
-
-
Save kkdai/4cff8319dfe38c432092e78a8acb1e9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (liff.isApiAvailable('shareTargetPicker')) { | |
liff.shareTargetPicker([{ | |
type: "text", | |
text: message | |
}]) | |
.then( | |
//alert("ShareTargetPicker was launched") | |
).catch(function(res) { | |
//alert("Failed to launch ShareTargetPicker") | |
}) | |
} | |
else { | |
alert("你的 LINE App 暫時不支援 Share Target Picker ,將開始外部瀏覽器。") | |
liff.openWindow({ | |
url: "{{.LIFFRedirectURL}}", | |
external: true | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment