英文:
Telegram login widget not showing up
问题
抱歉,我是一个完全的新手。
我部署了这个网站
https://visionary-cupcake-b69c3d.netlify.app/
- 为了测试,我使用了代码的这一部分:
</script>
<!-- 添加的 Telegram 脚本的开头 -->
<script async src="https://telegram.org/js/telegram-widget.js?22" data-telegram-login="Guardian200_bot" data-size="large" data-auth-url="ya.ru"></script>
</script>
<!-- 添加的 Telegram 脚本的结尾 -->
- 我的机器人已经注册,并且我指定了 [visionary-cupcake-b69c3d.netlify.app] 作为域名。
- 网站正在使用所需的 HTTPS 协议。
然而,登录小部件没有显示出来。可能的原因是什么?
我已经重新部署了它多次,检查了来自这里 https://core.telegram.org/widgets/login 的各种设置,但都没有成功。
英文:
Sorry I am a total newb.
I deployed this site
https://visionary-cupcake-b69c3d.netlify.app/
- used this part of the code for the test
</script>
<!-- Start of the added Telegram script -->
<script async src="https://telegram.org/js/telegram-widget.js?22" data-telegram-login="Guardian200_bot" data-size="large" data-auth-url="ya.ru"></script>
</script>
<!-- End of the added Telegram script -->
- my bot is regstered and I specifiyed [visionary-cupcake-b69c3d.netlify.app] as a domain
- site is using https as required
Yet login widget is not showing up. Why it could be?
I redeployed it few times, checked various settings from there https://core.telegram.org/widgets/login to no avail
答案1
得分: 0
It seems like you have put the <script>
tag inside the <head>
. Put it somewhere inside the <body>
, so it can be displayed when the button component is created.
<body>
<div class="content">
<!-- your app -->
<!-- the script tag provided by Telegram wherever you want the button to be -->
</div>
</body>
英文:
It seems like you have put the <script>
tag inside the <head>
. Put it somewhere inside the <body>
, so it can be displayed when the button component is created.
<body>
<div class="content">
<!-- your app -->
<!-- the script tag provided by Telegram wherever you want the button to be --->
</div>
</body>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论