Include functions related to Kakao links.
Methods
-
<static> cleanup()
-
Disable resources associated with sending Kakao links.
-
<static> createCustomButton(settings)
-
Create and send custom links of the desired type. Go to custom link guide
Parameters:
Name Type Description settings
CustomLinkSettings Attributes of Kakao Link are passed by 'key/value' format.
Properties
Name Type Description container
String | DOMElement If you pass a DOM Element or Element's ID Selector, a Kakao link will be sent when the Element is clicked.
-
<static> createDefaultButton(settings)
-
You can easily send links by configuring an object that fits the link type.
Parameters:
Name Type Description settings
DefaultFeedSettings | DefaultListSettings | DefaultLocationSettings | DefaultCommerceSettings | DefaultTextSettings Pass appropriate settings to key/value depending on type.
Properties
Name Type Description container
String | DOMElement If you pass a DOM Element or Element's ID Selector, a Kakao link will be sent when the Element is clicked.
-
<static> createScrapButton(settings)
-
Use the meta-information of the site to send links.
Parameters:
Name Type Description settings
ScrapLinkSettings Attributes of Kakao Link are passed by 'key/value' format.
Properties
Name Type Description container
String | DOMElement If you pass a DOM Element or Element's ID Selector, a Kakao link will be sent when the Element is clicked.
-
<static> deleteImage(settings)
-
You can delete the image by forwarding the path of the image you want to delete.
Parameters:
Name Type Description settings
Object Attributes of Kakao Link image setting are passed by 'key/value' format.
Properties
Name Type Description imageUrl
String URL of the image to delete
Returns:
- Type
- Promise
-
<static> scrapImage(settings)
-
Scrap and upload images of the path you passed (the image will be stored for 20 days).
Parameters:
Name Type Description settings
Object Attributes of Kakao Link image setting are passed by 'key/value' format.
Properties
Name Type Description imageUrl
String URL of image to scrap
Returns:
- Type
- Promise.<ImageInfos>
-
<static> sendCustom(settings)
-
Create and send custom links of the desired type. Go to custom link guide
Parameters:
Name Type Description settings
CustomLinkSettings Attributes of Kakao Link are passed by 'key/value' format.
-
<static> sendDefault(settings)
-
You can easily send links by configuring an object that fits the link type.
Parameters:
Name Type Description settings
DefaultFeedSettings | DefaultListSettings | DefaultLocationSettings | DefaultCommerceSettings | DefaultTextSettings Pass appropriate settings to key/value depending on type.
-
<static> sendScrap(settings)
-
Use the meta-information of the site to send links.
Parameters:
Name Type Description settings
ScrapLinkSettings Attributes of Kakao Link are passed by 'key/value' format.
-
<static> uploadImage(settings)
-
Upload the images you need for the Kakao Link (the images are stored for 20 days).
Parameters:
Name Type Description settings
Object Attributes of Kakao Link image setting are passed by 'key/value' format.
Properties
Name Type Description file
FileList Files property of HTMLInputElement
Returns:
- Type
- Promise.<ImageInfos>
Type Definitions
-
ButtonObject
-
The button object added to the bottom of the message.
Type:
- Object
Properties:
Name Type Description title
String Title of button
link
LinkObject The link to be moved when the button is clicked
-
CommerceObject
-
Object used to express price information.
Type:
- Object
Properties:
Name Type Argument Description regularPrice
Number General price
discountPrice
Number <optional>
Discounted price
discountRate
Number <optional>
Discount rate
fixedDiscountPrice
Number <optional>
Fixed discounted price. This option is not available at the same time as the discount rate.
-
ContentObject
-
Objects that contain content. You can have one image, title, description, and link information.
Type:
- Object
Properties:
Name Type Argument Description title
String title of content
link
LinkObject Link information to move when clicking content
imageUrl
String image URL of content
imageWidth
Number <optional>
Image width of content (Unit: Pixel)
imageHeight
Number <optional>
Image height of content (Unit: Pixel)
description
String <optional>
a detailed description of content
-
CustomLinkSettings
-
The configuring object used to send custom Kakao links through the
Kakao.Link.sendCustom
.Properties:
Name Type Argument Default Description container
String | DOMElement If you pass a DOM Element or Element's ID Selector, a Kakao link will be sent when the Element is clicked.
templateId
Number Template id of message, Check [App Settings] - [Message Template v2]
templateArgs
Object <optional>
The arguments to pass on to the message. ex.{'name':'kakao', 'url':'https://developers.kakao.com'}
installTalk
Boolean <optional>
false If KakaoTalk is not installed, go to the KakaoTalk Install page in the market.
fail
function <optional>
Callback function called when function call failed
success
function <optional>
Callback function (including a warning message) to check responses to requests for Kakao links
callback
function <optional>
Callback Function Called when clicking Shared buttons in Kakao Link Web Sharing
serverCallbackArgs
String <optional>
Parameters included in the link callback that is transmitted when sharing a kakao link. Go to Link Callback Guide
-
DefaultCommerceSettings
-
The configuring object used to send commerce-type Kakao links through the
Kakao.Link.sendDefault
.Type:
- Object
Properties:
Name Type Argument Default Description objectType
String objectType: 'commerce'
content
ContentObject Main content
commerce
CommerceObject Price information
social
SocialObject <optional>
Social information
buttonTitle
String <optional>
Use default link according to [App Settings]. Buttons option is applied if buttons option is present
buttons
Array.<ButtonObject> <optional>
Title and link settings for buttons. Buttons option is applied if buttonTitle option is present
installTalk
Boolean <optional>
false If KakaoTalk is not installed, go to the KakaoTalk Install page in the market.
fail
function <optional>
Callback function called when function call failed
success
function <optional>
Callback function (including a warning message) to check responses to requests for Kakao links
callback
function <optional>
Callback Function Called when clicking Shared buttons in Kakao Link Web Sharing
serverCallbackArgs
String <optional>
Parameters included in the link callback that is transmitted when sharing a kakao link. Go to Link Callback Guide
-
DefaultFeedSettings
-
The configuring object used to send feed-type Kakao links through the
Kakao.Link.sendDefault
.Type:
- Object
Properties:
Name Type Argument Default Description objectType
String objectType: 'feed'
contents
ContentObject Main content
social
SocialObject <optional>
Social information
buttonTitle
String <optional>
Use default link according to [App Settings]. Buttons option is applied if buttons option is present
buttons
Array.<ButtonObject> <optional>
Title and link settings for buttons. Buttons option is applied if buttonTitle option is present
installTalk
Boolean <optional>
false If KakaoTalk is not installed, go to the KakaoTalk Install page in the market.
fail
function <optional>
Callback function called when function call failed
success
function <optional>
Callback function (including a warning message) to check responses to requests for Kakao links
callback
function <optional>
Callback Function Called when clicking Shared buttons in Kakao Link Web Sharing
serverCallbackArgs
String <optional>
Parameters included in the link callback that is transmitted when sharing a kakao link. Go to Link Callback Guide
-
DefaultListSettings
-
The configuring object used to send list-type Kakao links through the
Kakao.Link.sendDefault
.Type:
- Object
Properties:
Name Type Argument Default Description objectType
String objectType: 'list'
headerTitle
String Header title
headerLink
LinkObject Header link
contents
Array.<ContentObject> Main contents
commerce
CommerceObject Price information
social
SocialObject <optional>
Social information
buttonTitle
String <optional>
Use default link according to [App Settings]. Buttons option is applied if buttons option is present
buttons
Array.<ButtonObject> <optional>
Title and link settings for buttons. Buttons option is applied if buttonTitle option is present
installTalk
Boolean <optional>
false If KakaoTalk is not installed, go to the KakaoTalk Install page in the market.
fail
function <optional>
Callback function called when function call failed
success
function <optional>
Callback function (including a warning message) to check responses to requests for Kakao links
callback
function <optional>
Callback Function Called when clicking Shared buttons in Kakao Link Web Sharing
serverCallbackArgs
String <optional>
Parameters included in the link callback that is transmitted when sharing a kakao link. Go to Link Callback Guide
-
DefaultLocationSettings
-
The configuring object used to send location-type Kakao links through the
Kakao.Link.sendDefault
.Type:
- Object
Properties:
Name Type Argument Default Description objectType
String objectType: 'location'
content
ContentObject Main content
address
String Address to use in map view, ex.235 Pangyo Station, Bundang-gu, Seongnam City
addressTitle
String <optional>
Address name to be used in map view, ex.Kakao headquarters
social
SocialObject <optional>
Social information
buttonTitle
String <optional>
Use default link according to [App Settings]. Buttons option is applied if buttons option is present
buttons
Array.<ButtonObject> <optional>
Title and link settings for buttons. Buttons option is applied if buttonTitle option is present
installTalk
Boolean <optional>
false If KakaoTalk is not installed, go to the KakaoTalk Install page in the market.
fail
function <optional>
Callback function called when function call failed
success
function <optional>
Callback function (including a warning message) to check responses to requests for Kakao links
callback
function <optional>
Callback Function Called when clicking Shared buttons in Kakao Link Web Sharing
serverCallbackArgs
String <optional>
Parameters included in the link callback that is transmitted when sharing a kakao link. Go to Link Callback Guide
-
DefaultTextSettings
-
The configuring object used to send text-type Kakao links through the
Kakao.Link.sendDefault
.Type:
- Object
Properties:
Name Type Argument Default Description objectType
String objectType: 'text'
text
String Up to 200 characters of text
buttonTitle
String <optional>
Use default link according to [App Settings]. Buttons option is applied if buttons option is present
buttons
Array.<ButtonObject> <optional>
Title and link settings for buttons. Buttons option is applied if buttonTitle option is present
installTalk
Boolean <optional>
false If KakaoTalk is not installed, go to the KakaoTalk Install page in the market.
fail
function <optional>
Callback function called when function call failed
success
function <optional>
Callback function (including a warning message) to check responses to requests for Kakao links
callback
function <optional>
Callback Function Called when clicking Shared buttons in Kakao Link Web Sharing
serverCallbackArgs
String <optional>
Parameters included in the link callback that is transmitted when sharing a kakao link. Go to Link Callback Guide
-
ImageInfos
-
Image information of
Kakao.Link.uploadImage
andKakao.Link.scrapImage
.Properties:
Name Type Description original
Object Properties
Name Type Description url
String Full URL of image
length
Number Image size, unit: Byte
content_type
String Image format
width
Number Image width of content
height
Number Image height of content
-
LinkObject
-
Link information objects that are moved when you click a content area or button in a message.
- At least one of the properties within an object must exist; if you do not enter any value, the button may not be visible or you may not move when clicking.
- Domains used in links must be registered in My Application Settings. Domains can be registered on the developer website's [My Application] - [Settings] - [General] menu.
- Link execution priorities are as follows. (android/ios)ExecutionParams > mobileWebURL > webURL.
Type:
- Object
Properties:
Name Type Argument Description webUrl
String <optional>
Used in KakaoTalk PC version, only allowed domains registered in [App Settings]
mobileWebUrl
String <optional>
Used in KakaoTalk Mobile version, only allowed domains registered in [App Settings]
androidExecParams
String <optional>
Used in the Android version of KakaoTalk, applied as mobileWebUrl if no value is available
iosExecParams
String <optional>
Used in KakaoTalk IOS version, applied as mobileWebUrl if no value is available
-
ScrapLinkSettings
-
The configuring object used to send scrap Kakao links through the
Kakao.Link.sendScrap
.Properties:
Name Type Argument Default Description container
String | DOMElement If you pass a DOM Element or Element's ID Selector, a Kakao link will be sent when the Element is clicked.
requestUrl
String Create a link based on the site URL to scrap, the meta information of the site
templateId
Number <optional>
Template id of message, Check [App Settings] - [Message Template v2]
templateArgs
Object <optional>
The arguments to pass on to the message. ex.{'name':'kakao', 'url':'https://developers.kakao.com'}
installTalk
Boolean <optional>
false If KakaoTalk is not installed, go to the KakaoTalk Install page in the market.
fail
function <optional>
Callback function called when function call failed
success
function <optional>
Callback function (including a warning message) to check responses to requests for Kakao links
callback
function <optional>
Callback Function Called when clicking Shared buttons in Kakao Link Web Sharing
serverCallbackArgs
String <optional>
Parameters included in the link callback that is transmitted when sharing a kakao link. Go to Link Callback Guide
-
SocialObject
-
Objects used to express social information such as the number of likes, the number of comments, and so on.
- Shows up to three of the five attributes. priorities are as follows. like > comment > shared > view > subscriber.
Type:
- Object
Properties:
Name Type Argument Description feedTypeSettings.social.likeCount
Number <optional>
Count of like
feedTypeSettings.social.commentCount
Number <optional>
Count of comment
feedTypeSettings.social.sharedCount
Number <optional>
Count of shared
feedTypeSettings.social.viewCount
Number <optional>
Count of view
feedTypeSettings.social.subscriberCount
Number <optional>
Count of subscriber