作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个简单的用例。当用户点击下面的链接时,
T.me/MycompanynameBot?start=Microsoft
最佳答案
是的,可以通过 answerCallbackQuery 检索机器人参数
Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via
@Botfather
and accept the terms. Otherwise, you may use links like:
t.me/your_bot?start=XXXX
that open your bot with a parameter.
{
"ok": true,
"result": [{
"update_id": 89590932,
"message": {
"message_id": 5978,
"from": {
"id": 223110107,
"is_bot": false,
"first_name": "Ğąme",
"last_name": "Ǿver!",
"username": "GameO7er",
"language_code": "en"
},
"chat": {
"id": 223110107,
"first_name": "Ğąme",
"last_name": "Ǿver!",
"username": "GameO7er",
"type": "private"
},
"date": 1579094448,
"text": "/start Microsoft",
"entities": [{
"offset": 0,
"length": 6,
"type": "bot_command"
}]
}
}]
}
if (type == "bot_command")
并获取文本和子字符串
/start
从原始文本或您想做的任何事情。
t.me/NameBot?start=ReferUserID
t.me/NameBot?start=223110107
关于telegram - 深度链接到 Telegram Bot ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59731664/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!