Facebook bot with multiple senders - facebook-messenger

Is it possible to make a Facebook bot look like there are multiple senders from the bot side? I couldn't see anything obvious in the Facebook docs. Even if the icon for the bot could be changed on the fly that may work
I'm trying to make a Facebook chat bot where a different 'person' will reply based on user input
EDIT:
As an alternative approach, could it be possible to use two separate facebook bots to have a semi simultaneous conversation with a single user. Take an example scenario where user starts a conversation with Bot A, then midway through the conversation, Bot B in a separate Facebook messenger chat, messages the user?

There is no way to do it currently;
For each Facebook Page, Facebook generates a unique id for the user(User#X has different id for PageA and PageB).
For each App(Bot) Facebook creates a unique id for the User#X(User#X will have different id for App#1 and App#1 for the same Facebook page)

Unfortunately, Messenger Bots are subscribed to individual Facebook Pages, so there is no way to have multiple users.

Related

Authorization flow for Microsoft Graph API

Very new to the Microsoft ecosystem, trying to understand the flow.
Use-case: we need a Teams bot that sends personal messages to users saying "A customer is waiting at location X" with 2 buttons [Accept] and [Reject] containing personalized links like "https://someurl.com/accept?message=123&user=[user_id]".
How I think I should do it:
Add a special user "servicenotifications#ourdomain.onmicrosoft.com"
Authorize the user & then get a token
Use the token in Send message with cards with cards containing button links
My problem: Got confused with authorizing my special user. Examples on auth V2 require to "redirect the user to the Microsoft identity platform /authorize endpoint." — in a nutshell, show them the login screen, ask for consent and so on.
But my user is a special notification bot, there is no human and I need that fully automated without any user interaction at any point. It's basically a background service sending messages under specific circumstances. Like a Slack bot telling you "Hey, reminder, John has birthday tomorrow".
My questions:
In general, am I moving in the right direction? Or is there a better way for the usecase?
How do I authorize this user without showing any login screen? Because that's an app, a bot, it's not a human and will be controlled fully externally.
Since authentication will be initiated by a bot, the ideal solution is to implement the OAuth2 Client Credentials Flow so that a service principal can be authenticated and authorized. Take a look at Get access without a user for more information.
There may be some operations that may not be allowed for service principals (documented as applications) like Sending chat message to a chat.

Can a Discord Bot Invite Other Bots?

Can a Discord bot invite other bots? Can Discord bots automatically accept invites they get in a DM? How would one go about doing this?
Is it possible to make a bot that accepts invites, or do bots have to be invited themselves.
No, this is not possible.
Users must invite the bot themselves to join the server. I'm not sure I understand the use case here, because users can get similar functionality by simply inviting the bot.
To generate an invite link, start by heading to the Discord developer portal.
Then, head to the "OAuth2" tab:
Scroll down and find the URL generator. You'll need to select the following:
Generally you'll want to calculate the permissions, but this will work for now.
Now, if you want users to invite your bot, you just need to share them this link!

Create a multiple messenger chat from the API

I want to create a "social" service of meetings between groups of strangers.
Since people do not know each other before meeting, I wish they could communicate before and especially before the appointment in case someone wants to prevent a delay or can not find others, or is first come on the scene for example...
This service would be accessible on the Web (no mobile application).
I told myself that integrating an available solution "offsite" would be a good idea because it allows to be used also on the phone. I thought of Messenger that is convenient because everyone or almost has facebook.
My idea is that people who sign up for a meeting are automatically added to a messenger group (or at least if the API does not allow it to create a group chat link they can join of their own chief...)
I have researched the API messenger and I have not found for the moment a way to create a group with Facebook IDs eg targeted.
Do you know if this is possible or something that has come closer in case it is not ?
for example a bot that creates a chat link with the users affected by the event ...
The Messenger API is for communication between Pages and (single) Users only. There is no API for User to User chats. You would have to create your own solution - Node.js with Socket.IO is perfect for that, for example.

Kik bot able to join a group

I've been playing with the REST API for writing kik bots and it seems very straightforward to do powerful things.
The kik bot I'm familiar with is RAGE, and that has a feature that when talking to it you send it 'friend' command and it responds by being your friend, which makes it able to be invited into a group you're in.
My question is, what API call is being made by the bot when it receives a 'friend' command. My test bot can't be invited to a group and I'd like it to be able to.
Feels like I'm missing a bunch of logic but not sure what - anyone assist?
Rage bot does not use official kik api Rage bot is not a bot account from kik, It's an user account. Hence It's a self bot. There is an open source python library that allows you to turn an user account into a Bot and Rage bot uses that exact same api you can find the github page here

Facebook app notifications: can they be via email and push for mobile/tablet?

I'm trying to find information on developing the UX of Facebook notifications being sent from a FB app.
The app will require FB permissions for users to save favorite content within the app (iFrame). We want to remind users to return to the app (once a month) when the public content is updated, but we also want to remind them to return (once a month) when the authorized content is updated.
Is it possible to send email and push notifications for mobile/tablet in these scenarios? Or is it best to only send onsite notifications? Are email/push notifications even possible? I am having a hard time finding information that is clear on the FB Dev. site. Thanks!
All apps developed using developer API can enable notifications. That's why games can send you notifications using your original notification stream.
I would also advise you to only use this communication model, since e-mail from a Facebook app might not be the way Facebook users want their notifications. Also remember that you have to ask for permission to send the user e-mail, and gives the user another argument not to use your FB-app. The less permission you ask for, the more easy it is for users to accept you apps permission request.
Further more, Facebook users can turn off e-mail permission at any given time. Then you would not be able to send e-mails and lose your way of communication to your users.

Resources