How can I use the same bot on multiple facebook pages using bot framework

前端 未结 5 2124
失恋的感觉
失恋的感觉 2020-12-16 07:12

I have several facebook pages and I would like to run the same bot on each page. I am using the bot framework and everything works perfectly for one page now. How do I assoc

5条回答
  •  粉色の甜心
    2020-12-16 08:01

    Sorry if my answer is late

    You can very well handle all your page traffic through just one bot backend

    1. Create an fb app and select product as messenger
    2. Add webook config pointing to your bot
    3. Select all the pages you want to associate one by one And keep the page access token handy.
    4. Go and search page id in your fb page and keep it handy
    5. Either in constant or dB maintain page access token against the page I’d
    6. When you get a callback on webhook you get a page entry and Id== page id
    7. Based on page I’d have your business logic
    8. Call send api using page access token which you have stored againtst the page id

    Hope this helps

提交回复
热议问题