Add kakao share button using SDK #555
Open
+176
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolve #512
Kakao SDK Behavior
window.Kakao.init
) is mandatory, making thecreateShareButton
structure unsuitable.<script>
tag, requiring direct DOM access.Constraints
SDK Initialization: Requires a JavaScript Key issued by the Kakao Developer Console.
URI Encoding: Kakao SDK performs internal encoding, so additional encoding is unnecessary.
Domain Registration: Only URLs from domains registered in
My Application > App Settings > Platform
are allowed. Unregistered URLs result in a blank page.Implementation
sendDefault
API to compose messages withobjectType: 'feed'
:webUrl
andmobileWebUrl
: Links must belong to registered domains.buttonTitle
: Sets the button text displayed within the KakaoTalk message.imageUrl
: Requires an externally accessible URL for images.Sharing counts are not provided via API but can be viewed in the developer console's statistics.
SDK load or initialization errors are logged using
console.error
without disrupting app execution.Additional Setup For Demo
vite-env.d.ts
in thedemo
folder to define theVITE_KAKAO_JS_KEY
type..env
file withVITE_KAKAO_JS_KEY
to provide the required JavaScript Key.Share Example in Kakao Chat Platform
1. Choosing Friends or Chat room for share
2. After chosen
other people's view in chat room
Signed-off-by: zmrdltl [email protected]