如何使用JavaScript从Telegram API获取新帖子

发布于 2025-02-03 08:24:09 字数 47 浏览 2 评论 0原文

有没有办法将最新帖子从电报频道发布到我的网站?我正在与JavaScript合作。

Is there a way to post the latest post from telegram channel to my website? I am working with JavaScript.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

薄荷→糖丶微凉 2025-02-10 08:24:09

您可以使用 post widget ,但是您需要找到一种方法来自己获取最新的频道帖子:我将使用一个机器人来跟踪何时发布帖子并将其ID存储在数据库中,然后将其显示在页面上。

You can use post widget, but you will need to find a way to get the latest channel post by yourself: I would use a bot to track when the post is posted and store its ID in a database, then I would display it on the page.

似梦非梦 2025-02-10 08:24:09

当您在插件的设置中输入频道的最后一个帖子链接时,您可以显示任何频道的帖子,但是如果您需要在TGCHANNEL WITGET上自动显示频道的所有新帖子,则应将@TGCH_BOT添加到Telegram Channel中。
当Telegram Channel发表新帖子时,该机器人将刷新小部件。我不知道这是如何工作的,但是我从WordPress插件中知道这一点。

You can display any channel’s post when you enter last post link of a channel in the plugin’s Setting, but if you need to automatically show all new posts of your channel on TGchannel widget, you should add @TGCH_BOT to your telegram channel as admin.
This bot will refresh widget posts when a new post published in telegram channel. I don't know how exactly this could work, but I know that from a wordpress plugin.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文