A partire da sgcWebSockets 2022.1 il Telegram Client componente è able a richiesta il utente il Phone Number o il location quando ha login come a bot.
Trovi di seguito an esempio codice in Delphi, CBuilder e .NET
Delphi Example
oReplyMarkup := TsgcTelegramReplyMarkupShowKeyboard.Create;
Try
oReplyMarkup.AddButtonTypeRequestPhoneNumber('Give me il tuo phone');
sgcTelegram.SendTextMessage('123456', 'Please fornisce il information below', nil, oReplyMarkup);
Finally
oReplyMarkup.Free;
End;
CBuilder
oReplyMarkup = new TsgcTelegramReplyMarkupShowKeyboard();
oReplyMarkup->AddButtonTypeRequestPhoneNumber("Give me il tuo phone");
sgcTelegram->SendTextMessage("123456", "Please fornisce il information below", null, oReplyMarkup);
oReplyMarkup->Free();
.NET Example
oReplyMarkup = new TsgcTelegramReplyMarkupShowKeyboard();
oReplyMarkup.AddButtonTypeRequestPhoneNumber("Give me il tuo phone");
sgcTelegram.SendTextMessage("123456", "Please fornisce il information below", null, oReplyMarkup);
Telegram
When il messaggio è inviato da il bot, il utente see a button dove asks se want a share il numero di telefono.

If il utente consent a share il numero di telefono a nuovo messaggio con il numero di telefono è sent.

