7
votes

In this Facebook docs page we learn how to create a bot for receiving and sending messages through a Facebook Page.

Is there a way to connect between a webhook and a page programatically and not manually?

If my product is a generic bot for Facebook Messenger, I want to be able to register him to pages without asking my clients to grant me an admin permission to their Facebook Page.

1
@CBroe - ohhh don't know how I missed that.. thanks - Asaf Nevo
@Asaf Nevo... Is it working for you. I mean i dont understand how are you setting webhook programmatically. - runitfirst
@runitfirst developers.facebook.com/docs/graph-api/webhooks Webhooks subscriptions can also be created and modified via the /{app-id}/subscriptions Graph API edge. - db42

1 Answers

3
votes

In case anyone else still has this problem, in addition to using the app subscription edge and the page subscription edge, you also need the following permissions: manage_pages, pages_messaging, read_page_mailboxes. The page was not showing up for me in the app > messenger settings until I added the read_page_mailboxes permission.