How to communicate with different pages with the same app
See original GitHub issueI want to make generic bot the can communicate with different pages knowing from which page the message received and response to the user in that specific page.
For knowing which page I think It can be done easily from the recipient attribute like this
bot.on('message', (payload, chat) => {
switch(payload.recipient) {
case '12334784': //page id
// do something
break;
case '9877654': //page id
// do something
break;
}
});
But in the first place BootBot accept only one page access token
const bot = new BootBot({
accessToken: 'PAGE_ACCESS_TOKEN',
verifyToken: 'FB_VERIFY_TOKEN',
appSecret: 'FB_APP_SECRET'
});
What is the best way to accomplish such thing? How to accept messages from different pages?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
4 Ways to Communicate Across Browser Tabs in Realtime
1. Local Storage Events ... You might have already used LocalStorage, which is accessible across Tabs within the same application origin. But do ......
Read more >How to Combine All of Your Messaging Apps in One Place
Each time, you have to open the separate app to look at your message. By having everything in one place, just clicking on...
Read more >How to communicate between multiple windows of the same ...
I've looked at the messaging samples, and they seem focused on communication between two different apps, or between an app and an extension....
Read more >How to communicate Between two lightning pages(AURA)
Your Answer · Asking for help, clarification, or responding to other answers. · Making statements based on opinion; back them up with references ......
Read more >Collaborate on documents in Pages, Numbers, and Keynote ...
Click or tap Show All Activity to see who's worked on the document and a summary of the changes they've made. Click or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would it be easier if we refactor code to make possible to pass the ‘route’ param to each Bot instance? Alike:
So each instance could listen their own route for webhooks.
@tmwd’s suggestion was implemented in #53 and there is an open PR for my suggestion above. I will close this now. Maybe someday we will have page routing but I don’t see it in the near future. Please open an issue specific to page routing if you still think it is a needed feature @MMayla. Cheers