Good day. I am writing in Python and Django working with the telebot library, there was this kind of meaning:
elif 'message' in data.keys(): if 'text' in data['message'].keys(): chat_id = data['message']['chat']['id'] According to him, I could contact with the help of a bot to the user like this code:
mes = 'Example' bot.send_message(chat_id, mes) Now ran into FB. There API is completely confusing and I can not understand where there is an analogue of the chat_id telegram.
import fbmq bot = fbmq.Page(token) data = json.loads(request.body.decode('utf-8')) try: if 'message' in data.keys(): if 'text' in data['message'].keys(): text = data['message']['text'] message_id = data['message']['mid'] chat_number = data['message']['seq'] elif 'sender' in data['sender'].keys(): if 'id' in data['sender'].keys(): recipient_id = data['sender']['id'] else: mes = 'Error' page.send(recipient_id, mes) return HttpResponse('OK') This is the start, please correct, if I do not do that. Because again, I repeat, the documentation is too incomprehensible and it is very difficult to understand, compared to other services
In the examples there is one thing, the documentation is completely different, and in the guides the more so all the different
