Originally Posted by
Black_Storm
can u send code in vb ?
You don't need "special code" for that, because the Telegram-Bot-API is quite simple.
JSON-responses are (in the end) just Strings.
So, if you know how to concat Strings in VB6, you can produce the needed JSON-string with relative ease.
E.g. when you want to show a "userdefined KeyBoard" which is organized like a "NumPad",
(the keys organized in a 3x4 matrix) - you will have to construct the following String:
Code:
{
"telegram": {
"text": "type a number",
"reply_markup": {
"keyboard": [
[ "7", "8", "9" ],
[ "4", "5", "6" ],
[ "1", "2", "3" ],
[ "0", ".", "OK"]
],
"one_time_keyboard": true,
"resize_keyboard": true
}
}
}
WhiteSpace (vbCrLfs, as well as the indentation per line) are optional - just make sure that
you keep track of all the braces, commas (and double-qouted double-qutoes) in all the right places)...
Perhaps Debug.Print your concatenated String-Output first - if you did everything right,
it should (line by line) basically look like the stuff in the Code-Box above:
Olaf