Is it possible for telegram bots to obtain the user's phone number after they have started the bot (without explicitly asking the user to input their contact details)?
If so, how do I achieve this using Telegram bot api or any other method?
For privacy reasons, it's absolutely impossible.
These are everything that bot knows about a user:
Field
Type
id
Integer
is_bot
Boolean
first_name
String
last_name
String
username
String
language_code
String
can_join_groups
Boolean
can_read_all_group_messages
Boolean
supports_inline_queries
Boolean
https://core.telegram.org/bots/api#user
I found your asking randomly
You must send user KeyboardButton, but Button must have option "request_contact" = true.
Screenshot from docs
https://core.telegram.org/bots/api#keyboardbutton
Related
I am writing .Net Core API code that examines the value of the AD B2C built-in emails claim. I'm expecting this claim to show up on the ClaimsPrincipal as an IList<string> or similar, but it is instead of type string.
The Email Addresses claim is selected in the Azure portal and shows a data type of StringCollection and the emails claim appears on the ClaimsPrincipal but it is of type string. The data I am working with only has a single email address per user so I'm not sure what would happen if there were multiple email addresses.
I understand why AD returns an emails claim (plural) rather than an email claim (singular) so why is the emails claim value a string (the user's email address) instead of an array containing that single email address?
This:
emails: 'email#somedomain.com'
Instead of this:
emails: ['email#somedomain.com']
I'm currently on .NET Core 3.1
Updated to .NET 6 and I still experience the same thing. Am I missing a setting in AD or elsewhere? Is this the expected behavior?
When i tried i got the alternate email address in stringCollection format.
Please try to raise a support request if two or more mails when added are not reflecting in the emails claim else its not an issue AFAIK.
i am trying to create line chatbot with several functions in it. One of the function need to know the user LINE ID (for example: ryan123) not user id (U858382312321123......). I am using google app script to create the line chatbot
is it possible to get user LINE ID using API? or is there any way to get this through line bot?
/profile/{userId} is the only* way you can get displayName
*though there endpoints to get the profile with userId by further specifying the groupId or roomId
In case your Messaging API bot is a verified or premium account, you can use a list of userId of followers at anytime with followers/ids
Otherwise, you need to store them upon follow, messsage, etc. events
I need to create an app and my plus page id isn't in integer but in my name. I've hovered on the date stamp as instructed by a support here but still showing my +name. How can I get my plus page id in integer? Google is simply not educating people on this!
You can use the APIs Explorer to get a Google+ page/profile ID.
Enter the string name for userId e.g. +GoogleDevelopers and for fields enter id.
Hi when I run the sample chat function provided by quickblox, it contains several built-in limitation for username registration, for example, I need to have a certain number of characters or type of characters in order to register. I'm wondering which files contain those registration and display of error messages (I only found a class called "errors" in SignUpViewController ) and how do I change those limitations?
There are 2 ways:
Sign Up & then Sign In with email
Sign Up & then Sign In with login - Login field should contain alphanumeric and punctuation characters only
Is it OK? Or you have problem with other User's field?
Im wondering if there is anyway to interogate facebook data on user interests. i.e. Retrieve the following data sets:
What are the most like interests/Pages on facebook?
Retreive the current users facebook interest and also their friends interests?
Really want to know if we can get facebook global interest/like data and than also if the user connects their facebook account to the site than we can also retrieve their interest data.
Thanks in advance
So you want to implement something like http://www.socialbakers.com/ ?
To get 1) you'd have to periodically poll the API for the public fan count of a known set of page IDs to see the current fan counts ( i think this is what socialbakers do)
To get 2, get the user_likes and friend_likes extended permissions from your users and access the /likes connection of the users whose likes you want to read
Yes you can retrieve user interests from facebook. You just need to include the user_interests permission required in your jsp page.
https://developers.facebook.com/tools/explorer/
If you are using spring social you can generate your own url for /me/interests:
URIBuilder uriBuilder1 = URIBuilder.fromUri(facebook.GRAPH_API_URL + "me" +"/interests");
String s = facebook.restOperations().getForObject(uriBuilder1.build(), String.class);