How can a Chat bot mention a user that is not yet in the room? - google-apps-script

I am trying to build a chatbot that will invite a user in a room where the Bot already is, but not yet the user.
User wants to join Room A
User DM the Bot and ask "invite me to Room A"
Bot, already in room A, mentions User
User is pulled in the room.
Currently, my bot can start a thread and mention a user, but the mention will work (showing #Username) only if Username is already in the room.
If Username is not in the room, it will show <users/1234....>.
Is there a way to do that?
Or in general, can a bot invite a user in a room?

Short answer: No.
Explanation: If you refer to Bot access to user data you'll find that -
In order to operate in a useful way, a bot needs to know who is invoking it, and how to address that person. Beyond this basic identity data, bots do not have access to user data unless granted explicitly by the user:
By default, bots can only read the basic identity of users that invoke them. This information includes the user's display name, user ID, email address, and avatar image.
If a bot needs to access other data to do its job, it can prompt the user to grant it additional access.
Hope this helps!

Related

Identify user with a specific information

How to identify an user with specific information like unique id or reference number in ejabberd API for chat?
I want to chat with someone then user has some information except name which is unique for that specific user. so we can identify the user in chat based on that?
on register user while calling /api/register API, there is no any unique response which is useful to make chat with another user
Even, /api/registered_users given only name of all the registered users, not any unique information
So, what is the solution?
any other APIs is there for the same or what?
A user (that may be a person, or a machine, or an animal) can register an account in ejabberd (or any other server). That account is identified by the account username and host, for example tom#example.com.
The user uses an account, and the account is identified by the account username and host.
There is nothing else. What else could there be?

Laravel Check the User Share Telegram Bot Link to other Users

Hi i want to develop the bot , but first i ask users to share the link of my bot to 5 other users then continue and register in my bot , i develop all sections but i cannot handle the first one, how can i detect that the use send share link to other user ?
i user laravel + talageram bot SDK to develop my bot.
i just want to know that user share the link and continue , i search in many docs and site bud i cannot find anythings that useful to me.
please help me to handle this problem in my telegram bot . thanks :)
Basically, you can't find out if your user has sent the link to others. You can only find out when the other user taps on the link and starts your bot. This can be done by Deep Linking. You should create a unique identifier for each user and add it as a query string to the special link made for the user.
Example:
https://telegram.me/my_bot?invitedFrom=user1
You have to check for invitedFrom parameter each time a user starts your bot in order to credit the referrer user.
By using above method, you will only be notified when the other user starts your bot.
However there is a trick you can do in order to see if a special message is forwarded to other users. Here are the steps:
Make a private channel.
Create a message containing your bot link.
Forward the message to your bot user.
Ask your bot user to forward the message to friends.
Check the view count of the message to know if it's seen by others.
By using this trick you can find out how many times the message containing your bot link is seen.

Create Website with Facebook API to collect invited User ID's

I am looking to integrate Facebook into my website. The website is basically an online meeting and the user has to know the host's username to log in. I was wondering if there is a way withing the Facebook API to invite specific users and link them to this meeting object, I was thinking by pulling the invited users User ID and inputting it into a database, so that when the guest goes to the party they just have to log into Facebook and it will bring them to the correct party (by MySQL search matching their user ID with a meeting). I hope I explained this correctly, but is there a way to do this with the API, or even a better way to complete this?

Facebook OAuth getting only email, possible?

I'm busy to enable login stuff via facebook oauth on my website, but the only thing I want to get is the email of the user.
I saw in dev docs the 'scope=email' but, it seem's mandatory for the user to allow access to anything about him.
is there's a way to ask him to grant access only on his email ?
No. The bare minimum that your app will request from the user is his Basic Information, followed by your extended permissions (in your case, his email address).
nope. email is a so called extended permission. so you have to get the basic set of data of the user. (like: name, fbid, gender, locale).

designing a database with facebook id and normal sign ups

So I am creating a website that basically allows user to sign up using their facebook account/facebook connect and just a traditional sign up (username, password). Now currently my table looks like this:
uid, username, password, email
I was thinking of how can I change this table structure to incorporate the facebook account connect as it doesn't have any username or password in it, should I just store the email and leave the username and password blank? How do other sites that have such login structure save this information?
You'll really want to store the facebook_id as well, for which I recommend using a bigint.
You might also want to add a status column that indicates whether this user account was created via email address or facebook_id, so that at login time you know which to check. Alternately, you could just check the one that you have credentials for.
This is a fairly open ended question, and the answers depend on what your trying to accomplish, and the use cases you're trying to address. Some general thoughts/suggestions: You should also store the Facebook ID as a separate column. You can leave the username blank, as the Facebook ID can uniquely identify the user, or you can use the email as the username. If you use only Facebook connect, you don't need the password since you can use the JS SDK to make sure the user has a valid Facebook login session.