Create multiple Facebook messenger bots with one app - facebook

The Facebook messenger bot API seems to require you create a Facebook app for each bot, for each page. The Facebook app stores the webhook, and connects to the page.
Is there a way to have a single Facebook app for many bots connected to many pages?
If you create a bot to resell to clients as a service, you need to be able to do this. But there does not seem to be any way. You need to create a Facebook app for each client, and go through the Facebook app review process for each page which is very difficult.
How can this be avoided?
Can a single Facebook app have multiple webhooks, or access to multiple pages messages?

You can create one chatbot and can use this bot in multiple Facebook pages. All you need is to store PAGE_ACCESS_TOKEN for each page and response messages to the user with right PAGE_ACCESS_TOKEN. You should get the necessary permissions to get page access tokens by Facebook Login. And then you need to subscribe the page to your chatbot(app): https://developers.facebook.com/docs/graph-api/reference/page/subscribed_apps
One important thing is Facebook generates a unique identifier for users for each page. Some user#A will have a different SENDER_ID/RECIPIENT_ID on different pages.

Related

How do I get leads from multiple facebook pages using a facebook app and a webhook?

I'm trying to get leads from facebook pages using a facebook app and a webhook. I'm using Zapier right now(which is working) but I'm trying to create a custom solution to replace Zapier. My webhook is working for one page, but I have about 10 facebook pages and each page has their own, separate lead forms. I've used the Lead Ads Testing Tool to check to see if my facebook app is listed and their is only one page that lists my facebook app - the one that is working. I can't figure out how to add my facebook application to the other pages. What I've tried: I went into Business manager and made sure that my facebook user account is listed under each page and verified that I'm an admin on all those pages. I also tried to add or assign a CRM to the pages under Integrations->Lead Access in Business Manager but my facebook application named TestApp is not accessible via the search(see 2nd image), in fact, no CRMs are searchable except for Zapier. Questions: How can I subscribe each page to my facebook app so leads from all my pages will be sent to my webhook? Or do I need to create a facebook app and webhook for each page?

Facebook Oauth-enticated users, chat between themselves on website

I have a website where users log in with Facebook. Right now there's no way for users to contact each other.
I was thinking of building a dedicated live messenger with sockets, but I wonder if there's an easier way to allow them to send messages to each other's Facebook Messanger, since they are already logged in with facebook.
There is no API for a chat between two users. Everything in Messenger API is focused on communication between a user and a page.
At most you can use the Send dialog to let a user send a link to their friends, but that requires the user actively using the button, you can not “automate” that; and handling the result will have nothing to do with your site any more, everything after that will happen in messenger only. https://developers.facebook.com/docs/sharing/reference/send-dialog

Is there any limit on page subscribed by a Facebook messenger app

I am trying to develop a Facebook messenger app and subscribe multiple Facebook pages on it because I don't want to create multiple Facebook apps which need to go through the Facebook review process each.
So, I tried out subscribing multiple page on it and it seems working. But, I think is there any limit of subscribed Facebook pages on any Facebook messenger app.

Questions regarding the review process for my code using Facebook API

When I'm getting ready to move my app that I created (in order to use the Facebook API), the process asks for things such as App Name, icon, etc. I only created an app in order to use the APIs. I'm calling the app from my website and the app will not be public facing outside of my website. What should I put for these questions? Is this even the correct way to use the APIs to write to a company page? I created the Facebook app because that's the only way I knew to be able to use the Facebook APIs. If I don't need an app and can use APIs in some other way can someone please direct me to an example?
What I'm doing is allowing a user on our website to post their Testimonial comments to our Facebook company page's Visitor Posts. They are presented with the Facebook login dialog and then upon successful login the testimonial is written to the company page and the user is returned to our website.

Facebook: How to post on own page using graph api without login

I own a blog like website, and as part of promotions I have a corresponding facebook page. My website contents are dynamic & when it gets updated(through a bot), I want the facebook page also to be updated by an automated post/publish from the bot which shows up the updates to the page viewers.
I could create a facebook page, and my bot programme which updates the web content is also able to publish the content on my facebook page using graph apis. But the posts are not publicly visible(Visible to only me/admin).
I could learn that it could be because my app through which my bot program is publishing to my facebook page is not public.
App->Status & Review, Status (Tab)
(Do you want to make this app and all its live features available to the general public?).
To make the app public, there is a review process which checks the facebook login button used in the website but my posts are through a backend bot and not through user action. My website is like a blog without user authentication so can't think of adding a login there.
Is it possible without having user login on the page? Also, If I post using twitter apis and link/configure my twitter account to my facebook page, it works.I guess this is not a new problem and many brands have automated it already, so need to understand how.
Am I missing something?
Apologies: I have checked previous posts on the same topic, but couldn't find relevant answers for the current Facebook version & policies.
Without the Login Review process, your posts can not be visible to the public.
To get it working, just send your page management tool (with the login dialog) for the review. Once they review it and accepted, you may change the flow a bit eg: skip the login part and allow auto posting.