Last active
June 27, 2020 10:25
-
-
Save jirawatee/534e79c704cdf9413bb529d72efa2a35 to your computer and use it in GitHub Desktop.
Share Target Picker
This file contains hidden or 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
<script> | |
function shareMsg(i, thumbUrl) { | |
// Ensure before calling shareTargetPicker() | |
if (confirm(`Share photo ${i}?`)) { | |
// Get original image from Image Resizes of Firebase Extentions | |
const origitalUrl = thumbUrl.replace('%2Fthumbs', '').replace('_200x200', '') | |
// Call Share Target Picker feature | |
liff.shareTargetPicker([ | |
{ | |
type: 'image', | |
previewImageUrl: thumbUrl, | |
originalContentUrl: origitalUrl | |
} | |
]) | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment