使用松弛块 api 创建一个 link 按钮
Create a link button with slack blocks api
我想要一个可以作为 link 的松弛按钮,它会在单击时将用户转到我的网站。
slack new api?
有可能吗?
是的,可以使用 block kit。
您所要做的就是在 actions
中添加一个 button
并提供 url
。单击它会重定向到 https://google.com 并且还会向 slack api.
发送请求
积木套件代码:
{
"blocks": [
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Click me"
},
"style": "primary",
"value": "click_me",
"url": "https://google.com"
}
]
}
]
}
输出:
我想要一个可以作为 link 的松弛按钮,它会在单击时将用户转到我的网站。 slack new api?
有可能吗?是的,可以使用 block kit。
您所要做的就是在 actions
中添加一个 button
并提供 url
。单击它会重定向到 https://google.com 并且还会向 slack api.
积木套件代码:
{
"blocks": [
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Click me"
},
"style": "primary",
"value": "click_me",
"url": "https://google.com"
}
]
}
]
}
输出: