[英]how to use login_url in telegram bot with php
hi guy does anyone knows about using inline keyboard in telegram bot for login_url?嗨,有人知道在电报机器人中使用内联键盘来获取 login_url 吗?
i just write this code for inlinekeyboard to take users to my website and login with telegram but it doesnt work my code:我只是为 inlinekeyboard 编写此代码,以将用户带到我的网站并使用电报登录,但它不适用于我的代码:
$replyuser=array( inline_keyboard=>array( array(array('text'=>urlencode("login \xE2\xAD\x90"),'callback_data'=>'log'.$chatid,array('login_url'=>array(array('url'=>'https://mywebsite.com/login.php','request_write_access'=>TRUE))))) ), ); $replyuser=array(inline_keyboard=>array(array('text'=>urlencode("login\xE2\xAD\x90"),'callback_data'=>'log'.$chatid,array('login_url'= >array(array('url'=>'https://mywebsite.com/login.php','request_write_access'=>TRUE)))))), );
i dont know how to use login-url object in telegram with this format我不知道如何在这种格式的电报中使用登录 URL object
[]
instead of array()
我建议使用[]
而不是array()
$replyuser = [
'inline_keyboard' => [[
[
'text' => urlencode("login \xE2\xAD\x90"),
'callback_data' => 'log'.$chatid
],
[
'text' => 'Login to the website'
'login_url' => [
'url' => 'https://mywebsite.com/login.php',
'request_write_access' => true
]
]
]]
];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.