telegram

How to join my Telegram Bot to PUBLIC channel

送分小仙女□ 提交于 2019-12-05 21:43:12
问题 My question is: how to join my telegram bot to a telegram public channel that I am not administrator of it, and without asking the channel's admin to add my bot to the channel? maybe the chatId of channel or thru link of channel? Thank you in advance :) edit------ I have heard that some people claim to do this join their bot to channels, and scrape data. So if Telegram does not allow it, how can they do it? can you think of any work around? Appreciate your time? 回答1: Till today, only the

How can I differentiate between a 'Message' update and a 'Callback Query' update? (Telegram Bot API)

血红的双手。 提交于 2019-12-05 21:41:15
Sorry if my question gets too messy, I'm new here, so, any advice is welcome. How can I differentiate between a 'Message' update and a 'Callback Query' update? I've managed to make an inline keyboard, but when I use it, the bot just hangs, he doesn't reply anything. I did a little bit of research and found this question , which helped me understand the problem, but not much else. My bot uses something like this right now: // read incoming info and grab the chatID $content = file_get_contents("php://input"); $update = json_decode($content, true); $chatID = $update["message"]["chat"]["id"];

what should be structure of website to retrieve site information in telegram?

落爺英雄遲暮 提交于 2019-12-05 14:42:40
Some website retrieved information in telegram when send link and some website doesn't like this: So my question is there any structure for website to load information in telegram ? The Open Graph protocol enables any web page to become a rich object in a social graph like Facebook, twitter, telegram, Skype and ... As an example, the following is the Open Graph protocol markup for The Rock on IMDB: <html prefix="og: http://ogp.me/ns#"> <head> <title>The Rock (1996)</title> <meta property="og:title" content="The Rock" /> <meta property="og:type" content="video.movie" /> <meta property="og:url"

Create new group using telegram bot API

China☆狼群 提交于 2019-12-05 09:54:07
How can I create new groups using a bot in Telegram? As far as I know a bot cannot do this itself, so is it possible to implement a bot as a regular user ? How? Update : This is what I want http://t.me/polyglossia As I know this is impossible according to the latest telegram bot api and its documentation that can be find here . Bots cannot create channels, groups and super groups they can only be added to groups or channel as administrator manually by human users. I myself don't use unofficial telegram apps and I have to say that they don't use the telegram bot API they use the Telegram API

Telegram-based chat on a PHP-based site: HOWTO?

纵饮孤独 提交于 2019-12-05 09:19:01
I can't figure out what exactly to use for interaction between my site and the Telegram service (first of all - how to get the authentication process done using PHP and other stuff like chat among users). On this page: https://core.telegram.org/api I haven't got an idea how to use those functions in PHP. According to this page: https://telegram.org/apps I have two choices: 1) The CLI-interface (unofficial, by the way): https://github.com/vysheng/tg and it doesn't have an autentification function among others. In order to authenticate yourself, you need to run: bin/telegram-cli -k tg-server.pub

Handle multiple questions for Telegram bot in python

六月ゝ 毕业季﹏ 提交于 2019-12-05 08:44:11
I'm programming a telegram bot in Python using the Telegram bot API. I'm facing the problem of managing questions that need an answer of the user. The problem arises when the program is waiting for an answer of one user and another user request information or ask another question before the first user responds. The Telegram API uses a code to handle the request. When you ask for updates you include a code. If the code you send is higher than a request code, it is mark as handled and telegram delete it and no longer appears in the updates. This code is sequential, so if you mark update 3 as

How to send a message to the user who logged in through the telegram in website?

落花浮王杯 提交于 2019-12-05 07:25:13
问题 How to send a message to the user who logged in through the telegram in website? Telegram Login for Websites Telegram bots are a powerful communication tool, but until today they couldn't start a conversation. Even if you wanted them to reach out to you, you had to chat them up first. and Bot API 3.6 Added the new field connected_website to Message. The bot will receive a message with this field in a private chat when a user logs in on the bot's connected website using the Login Widget and

How to create pagination with inline keyboard in telegram

醉酒当歌 提交于 2019-12-05 07:09:27
问题 I am creating a Telegram bot wit Node.js and I am using node-telegram-bot-api module. My current issue is: To create pagination with inline keyboard. In documentation here, has an interesting example of what I need. For appearances, I must use method editMessageText but for update inline keyboard I need to transfer param inline_message_id . Unfortunately I could not understand how to do it. I will be very much appreciate for any example to update inline keyboard and how it release in this

Iinline keyboard. I made a button, but what to do with the callback_data?

本小妞迷上赌 提交于 2019-12-05 06:34:45
问题 Need help with inline keyboard. I made a button, but what to do with the callback? I understand I need to somehow get a callback_data and issue a new message. <?php $access_token = 'xxx'; $api = 'https://api.telegram.org/bot' . $access_token; $output = json_decode(file_get_contents('php://input'), TRUE); $chat_id = $output['message']['chat']['id']; $first_name = $output['message']['chat']['first_name']; $message = $output['message']['text']; $callback_query = $output['callback_query']; $data

send long message with photo on telegram with php bot

萝らか妹 提交于 2019-12-05 06:32:13
I need send to telegram long text with photo but telegram image caption has 200 character limit. How can send long text with photo using php and bot? sendPhoto method has 200 character limit. I see a telegram bot it's send long text and photo see my sample photo. You can use empty character! Just set parse_mode Field to HTML in sendMessage method , then in text Field insert the URL of the image into href The hyperlink will not be seen when you use empty character : <a href="https://www.nafasbekesh.ir/wp-content/uploads/2016/10/img1.jpg"> ⁠</a> Copy the empty character for your own use. You can