如何使用JavaScript从Telegram API获取新帖子
有没有办法将最新帖子从电报频道发布到我的网站?我正在与JavaScript合作。
Is there a way to post the latest post from telegram channel to my website? I am working with JavaScript.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 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.
当您在插件的设置中输入频道的最后一个帖子链接时,您可以显示任何频道的帖子,但是如果您需要在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.